home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / THINK C Digest / 1991 / 91-09 < prev    next >
Text File  |  1995-12-31  |  96KB  |  2,816 lines

  1. 
  2. Path: ucivax!gateway
  3. From: KTC0440CSCI%APSU.BITNET@cunyvm.cuny.edu (Kerry 'UPE' Cianos)
  4. Subject: EditText solved
  5. Message-ID: <76D867E6C06022A7@APSU.BITNET>
  6. Newsgroups: fa.think-c
  7. X-VMS-To: IN%"think-c@ics.uci.edu"
  8. Lines: 15
  9. Date: 1 Sep 91 04:55:25 GMT
  10. X-Envelope-to: think-c@ics.uci.edu
  11.  
  12.  
  13.   Welp, thanks to the people who sent me mail on my problem.  Since I'm so
  14. new to Mac programming that I overlooked a simple problem.  I was sitting
  15. reading IM I when it says I need to check for the command key if I have
  16. items that use it... well, I just stuck two lines of code in to check for
  17. the Return key instead and bingo!  Problem solved!!  Sometimes you just
  18. gotta take a step back ...
  19.  
  20.      Kerry
  21.  
  22.   ------------------------------------------------------------------------
  23.   Kerry Cianos, President                PS/2 = PS divided by 2 =
  24.   Impress Technologies                   half a computer, thats ok, OS/2
  25.   Email : ktc0440c@apsu.bitnet           is only half an operating system!
  26.  
  27. 
  28. 
  29. Path: ucivax!gateway
  30. From: ollef@sics.se
  31. Subject: Re: EditText Item for Modeless
  32. Message-ID: <9109021037.AA05435@tyfon.sics.se>
  33. In-Reply-To: Your message of 31 Aug 91 20:09:39 +0000.
  34.              <2D593142A060179F@APSU.BITNET>
  35. Newsgroups: fa.think-c
  36. Lines: 66
  37. Date: 2 Sep 91 10:38:31 GMT
  38.  
  39.  
  40. > You should be able to type in
  41. >the number and hit return, then other fields in the dialog would be updated
  42. >accordingly.  I've made a modeless dialog, with a TextEdit item.  But
  43. >again, when I hit return it actually does a CR.
  44.  
  45. I made a modeless dialog for some year(s) ago. To intercept the returnkey and
  46. all sort of arrowkeys I checked each keyDownEvent before sending it to
  47. DialogSelect(). Here you could also check if the character is a number.
  48.  
  49. I've included the EventLoop below. Note: this is not an example of good
  50. programming style, but at least it works
  51.  
  52.  
  53. void EventLoop() {
  54.     extern EventRecord    theEvent;
  55.     extern int itemHit,itemLast;
  56.     extern DialogPtr theDialog;
  57.     register char thechar;
  58.     while (itemHit != 22) {
  59.     SystemTask();
  60.     GetNextEvent(everyEvent,& theEvent);
  61.  
  62.     if (theEvent.what==keyDown||theEvent.what==autoKey){
  63.         thechar=theEvent.message & charCodeMask;
  64.         if  (thechar ==13){
  65.             itemHit=1; /*interception of returnkey*/
  66.             HandleConjDialog();}
  67.         else if ((theEvent.modifiers & cmdKey)!=0)
  68.             doMenu(MenuKey(thechar));
  69.         else if (thechar==30){    /*arrowkey up*/
  70.             itemHit=(itemLast-1);
  71.             if (itemHit==1) itemHit=16;
  72.             HandleConjDialog();}
  73.         else if (thechar==31){    /*arrowkey down*/
  74.             itemHit=(itemLast+1);
  75.             if (itemHit==17) itemHit=2;
  76.             HandleConjDialog();}
  77.         else{
  78.             DialogSelect(&theEvent, &theDialog, &itemHit);
  79.             HandleConjDialog();}
  80.         }
  81.  
  82.      else if (IsDialogEvent(&theEvent)) {
  83.         if (DialogSelect(&theEvent, &theDialog, &itemHit)) {
  84.             HandleConjDialog();    }
  85.               }
  86.      else {
  87.           if (theEvent.what==mouseDown)
  88.           HandleMouseDown(&theEvent);
  89.             /* Handle non-dialog events */
  90.          }
  91.      }
  92. }
  93.  
  94.  
  95.  
  96.  
  97.        /Olle
  98.  
  99.  
  100. ------------------------------------------------------------
  101. Olle Furberg                       Internet: ollef@sics.se
  102. Satellitbild in Kiruna             Phone: +46 980 121 40
  103. Swedish Space Corporation          Fax: +46 980 160 44
  104. ------------------------------------------------------------
  105. 
  106. 
  107. Path: ucivax!gateway
  108. From: udsugar@king.mcs.drexel.edu (David Sugar)
  109. Subject: Gestalt/TrapAvailable??
  110. Message-ID: <9109030450.AA04599@mcs.drexel.edu>
  111. Newsgroups: fa.think-c
  112. Lines: 13
  113. Date: 3 Sep 91 04:54:31 GMT
  114.  
  115.  
  116.   I'm using Gestalt calls to check for system stats, but I need to know
  117. wether Gestalt is actually there before I call it...
  118.   In IM VI it says to call TrapAvailable, but Think C doesn't seem to
  119. like that call.  Is there something I'm missing?  I am seting
  120. _Gestalt to 0xA1AD and the calling TrapAbailable(_Gestalt); just like
  121. in IM VI page 3-32.  Is there an include that I might be missing or
  122. something.  I'm using Think C 4.0.5 and have the Gestalt include
  123. that I ftp'ed from ics.uci.edu...
  124.  
  125. Dave Sugar
  126. udsugar@mcs.drexel.edu
  127.  
  128. 
  129. 
  130. Path: ucivax!gateway
  131. From: dave@ccs.itd.umich.edu
  132. Subject: Re: Gestalt/TrapAvailable??
  133. Message-ID: <9109030653.AA14864@ccs.itd.umich.edu>
  134. In-Reply-To: Your message of "03 Sep 91 04:54:31 GMT."
  135.              <9109030450.AA04599@mcs.drexel.edu>
  136. Newsgroups: fa.think-c
  137. Lines: 13
  138. Date: 3 Sep 91 06:53:21 GMT
  139.  
  140. > From:    David Sugar <udsugar@king.mcs.drexel.edu>
  141. > To:      think-c@ics.uci.edu
  142. >
  143. >  In IM VI it says to call TrapAvailable, but Think C doesn't seem to
  144. >like that call.  Is there something I'm missing?  I am seting
  145. >_Gestalt to 0xA1AD and the calling TrapAbailable(_Gestalt); just like
  146. >in IM VI page 3-32.  Is there an include that I might be missing or
  147. >something.  I'm using Think C 4.0.5 and have the Gestalt include
  148. >that I ftp'ed from ics.uci.edu...
  149.  
  150. Check page 3-8 of IM VI for the source code to TrapAvailable.
  151. (Or there are a few other versions floating around...)
  152.   --dave koziol
  153. 
  154. 
  155. Path: ucivax!gateway
  156. From: CZYCHI%CSGHSG5A@pucc.princeton.edu ("Gary T. Czychi")
  157. Subject: Re: TCL: Changing TextEdit fields on 'TAB'?
  158. Message-ID: <1E47DB040F9FA07CD3@csghsg5a.bitnet>
  159. Newsgroups: fa.think-c
  160. X-VMS-To: THINK-C
  161. Lines: 47
  162. Date: 3 Sep 91 19:02:19 GMT
  163. X-Envelope-to: think-c@ics.uci.EDU
  164.  
  165.  
  166. Thanks a lot for the two tips I got (from Phil Shapiro and Larry
  167. Watanabe), but somehow it will not work. I still have problems with
  168. the gGopher:
  169.  
  170.  
  171. I wrote:
  172.  
  173.  >>  From: "Gary T. Czychi" <CZYCHI%CSGHSG5A@pucc.princeton.edu>
  174.  >>  In my AppMaker generated code for my main window (CMainWindow)
  175.  >>  which is a Subclass of CWindow, I have defined several TextEdit
  176.  >>  fields.
  177.  >>
  178.  >>  Now, I want to jump from field to field when the user types a 'TAB'
  179.  >>  or a 'CR'.
  180.  
  181.  
  182. phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:
  183.  
  184.  > If you want to modify the behavior of the tab key, you'll have to
  185.  > subclass the CEditText class to special-case the tab key.
  186.  
  187. ok, I did that.
  188.  
  189.  
  190. watanabe@cs.uiuc.edu, (Larry Watanabe) writes:
  191.  
  192.  > You have to make sure that gGopher is set so that the mainwindow
  193.  > will get keydown events. Also, any gGophers have to pass the
  194.  > keydown event upwards if they get it.
  195.  
  196. I really would like to do that, if I only knew how. I read the
  197. (sparse) OO manual several times now, but that didn't help. Sorry.
  198. I simply don't know how to set the gGopher and where.
  199.  
  200.  
  201. Please help,
  202.  
  203.   Gary
  204.  
  205.     Gary T. Czychi          University of St.Gallen
  206.  
  207.        czychi@alpha.unisg.ch (preferred host)
  208.          czychi at csghsg52   (=bitnet)
  209.            czychi@bernina.ethz.ch
  210.              Switzerland
  211.               -
  212. 
  213. 
  214. Path: ucivax!gateway
  215. From: russotto@eng.umd.edu ("Matthew T. Russotto")
  216. Subject: Re:  Gestalt/TrapAvailable??
  217. Message-ID: <9109040111.AA11442@bree.eng.umd.edu>
  218. Newsgroups: fa.think-c
  219. Lines: 2
  220. Date: 4 Sep 91 01:12:20 GMT
  221.  
  222. TrapAvailable is a macro, it compares the trap address of Unimplemented (A89F)
  223. with the trap number.  If they are not equal, the trap is available.
  224. 
  225. 
  226. Path: ucivax!gateway
  227. From: fleabag@athena.mit.edu
  228. Subject: disabled menu items, and the meaning of life
  229. Message-ID: <9109041619.AA18784@e40-008-6.MIT.EDU>
  230. Newsgroups: fa.think-c
  231. Lines: 47
  232. Date: 4 Sep 91 16:20:04 GMT
  233.  
  234.  
  235. hi all,
  236.  
  237.  
  238. i've had quite the lesson this week.  as you read this,
  239. see if you have a reasonable answer to the question
  240. "what are disabled menu items for?".
  241.  
  242. first experience:  for whatever reason, i chose the
  243. disabled "Open Selection" menu item in Think C 5.
  244. no selection was chosen, just a friendly blinking
  245. cursor.  so Think churns for a moment and tells me
  246. that "file "" not found".  this only works when using
  247. the mouse to select the menu item, not command-D.  (it
  248. also works in Think C 4.)  why does Think allow you to
  249. choose a disabled menu item?
  250.  
  251. next experience:  now i'm curious.  while in the finder
  252. (7.0), all windows closed and no items on the desktop
  253. selected, the "view" menu and all of its items are dimmed.
  254. i have left a few straggling icons on the desktop, but
  255. no windows.  so, with the mouse i choose "by name" from
  256. the disabled menu.  all i can say is, well, try it and
  257. tell me it ain't a bug.  not only is the disabled menu item
  258. usable, but it does wrong things to the screen.  all of the
  259. "view" menu items work similarly.
  260.  
  261. by this time i've come to question all that i hold sacred.
  262. what really are disabled menu items for?  at the state of
  263. my current project, i have so many bugs that i just might
  264. take them all and give them disabled menu items!
  265.  
  266. final experience:  i'm running a version of my project which
  267. was compiled with Think C 4 and TCL 1.0 (it'll be weeks
  268. before it runs smoothly with 5.0 and 1.1).  for the same
  269. reasons of disbelieving curiosity i choose a menu item which
  270. i disable via gBartender->DisableCmd().  need i say more?
  271. i was treated to an error which i had tried to make impossible
  272. by following both apple's and Think's guidelines.
  273.  
  274. WHAT IS GOING ON HERE?????
  275.  
  276. i wish i were less angry about this.
  277.  
  278. :jeff bellsey
  279. fleabag@athena.mit.edu
  280.  
  281. 
  282. 
  283. Path: ucivax!gateway
  284. From: rodrigo@cmsun.cmf.nrl.navy.mil
  285. Subject: Floating Windows vs Windows
  286. Message-ID: <9109041657.AA14408@cmsun.cmf.nrl.navy.mil>
  287. Newsgroups: fa.think-c
  288. Lines: 27
  289. Date: 4 Sep 91 17:34:53 GMT
  290.  
  291.  
  292.  
  293. I have what may be a couple of  FAQ. Im new to the Mac programming
  294. environment.
  295.  
  296.  
  297. What is the difference between floating windows and
  298. normal windows? When they must be used? Is there a
  299. speed/memory factor that will make choose one over another.
  300.  
  301.  
  302. If you know C well and have never programmed on the Mac
  303. would you recommend using TCL or write code directly in C.
  304. TCL  seems to make life easier however it is kind of a
  305. Toolbox on top of the MAc Toolbox. Would it be reasonable
  306. to learn the MAC Toolbox first writing code in C and then
  307. go to TCL or do it directly in TCL?
  308.  
  309. Any comments along these lines are appreciated.
  310.  
  311. Thanks.
  312.  
  313. rodrigo@cmf.nrl.navy.mil
  314.  
  315.  
  316.  
  317.  
  318. 
  319. 
  320. Path: ucivax!gateway
  321. From: wnn@ornl.gov (Wolfgang Naegeli)
  322. Subject: Re: disabled menu items, and
  323. Message-ID: <9109041321.aa00496@ics.uci.edu>
  324. Newsgroups: fa.think-c
  325. Lines: 38
  326. Date: 4 Sep 91 20:21:44 GMT
  327.  
  328.         Reply to:   RE>disabled menu items, and th
  329. fleabag@athena.mit.edu writes:
  330.  
  331. > while in the finder
  332. > (7.0), all windows closed and no items on the desktop
  333. > selected, the "view" menu and all of its items are dimmed.
  334. > i have left a few straggling icons on the desktop, but
  335. > no windows.  so, with the mouse i choose "by name" from
  336. > the disabled menu.  all i can say is, well, try it and
  337. > tell me it ain't a bug.  not only is the disabled menu item
  338. > usable, but it does wrong things to the screen.  all of the
  339. > "view" menu items work similarly.
  340.  
  341. You certainly have discovered an interesting "feature."
  342. It doesn't matter whether you have folder or application windows open.
  343. The dimmed list-view selections treat the entire desktop as a folder window.
  344. The first line of the list, however, overwrites the header.
  345.  
  346. The file list is fully functional, you can edit file names, doubleclick icons,
  347. and even use the hierarchical folder triangles (and they give you a white
  348. background for the exploded part of the list!)
  349.  
  350. It looks a little messy, but it might be usefule for people who have lots of
  351. stuff on the desktop. Being able to look at it by name, date, or size, etc. may
  352. come in handy. I'd recommend MasterFinder for that, but if you don't want to
  353. spend the money...
  354.  
  355. The one thing that I find irritating about this "feature" however, is that when
  356. you select "by icon" again, not all of the icons go back to their original
  357. location, at least not on the virtual part of my screen.
  358.  
  359. Wolfgang N. Naegeli
  360. University of Tennessee & Oak Ridge National Laboratory
  361. Internet: wnn@ornl.gov  (best)       Bitnet: wnn@ornlstc
  362. QuickMail (QM-QM): Wolfgang Naegeli @ 615-574-4510
  363. Phone: 615-574-6143       Fax: 615-574-6141 (OrchidFax)
  364.  
  365.  
  366. 
  367. 
  368. Path: ucivax!gateway
  369. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  370. Subject: Re: disabled menu items, and the meaning of life
  371. Message-ID: <199109042050.AA05172@tarski.cogsci.uiuc.edu>
  372. In-Reply-To: <9109041619.AA18784@e40-008-6.MIT.EDU>; from "fleabag@athena.mit.edu" at Sep 4, 91 4:20 pm
  373. X-Mailer: ELM [version 2.3 PL11]
  374. Newsgroups: fa.think-c
  375. Lines: 16
  376. Date: 4 Sep 91 21:08:54 GMT
  377.  
  378. jeff bellsey (fleabag@athena.mit.edu) writes:
  379.  
  380. [complaints about being able to select disabled menus]
  381.  
  382. You aren't by any chance running Magic Apple, are you? Magic Apple, that
  383. mis-released copy of the Hand Off II utility Super Menu displayed exactly
  384. this behavior. Disabled menu items do not return the same way that enabled
  385. ones do when MenuSelect is not patched by a poor utility.
  386.  
  387. pr
  388. --
  389. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  390. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  391. System manager - Cognitive Science Group, Beckman Institute, UIUC
  392. Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
  393. BITNET (if no other way) : FREE0285@UIUCVMD
  394. 
  395. 
  396. Path: ucivax!gateway
  397. From: danielse@stdim.xstor.com (Daniel Segel)
  398. Subject: Disabled Menu Items
  399. Message-ID: <207@stdim.xstor.com>
  400. Newsgroups: fa.think-c
  401. Lines: 13
  402. Date: 4 Sep 91 23:30:25 GMT
  403.  
  404. Any chance you guys are running Magic Apple (part of the beta version of HandOff
  405. that does the Heirarchical Apple Menus), the Extension that was floating around
  406. a month or two ago?
  407.  
  408. Magic Apple lets you select disabled menu items.
  409.  
  410. daniel s.
  411.  
  412. ________________________________________________________________________________
  413. Daniel A. Segel           |   Storage Dimensions, Inc.  |  "That's funny,
  414. daniels@xstor.com         |        408/879-0300         |   it works here..."
  415.                           | Macintosh Technical Support |
  416. ________________________________________________________________________________
  417. 
  418. 
  419. Path: ucivax!gateway
  420. From: rudman@mondo.engin.umich.edu (Daniel Edward Rudman)
  421. Subject: Re: disabled menu items, and the meaning of life
  422. Message-ID: <9109050042.AA05728@mondo.engin.umich.edu>
  423. Newsgroups: fa.think-c
  424. Lines: 65
  425. Date: 4 Sep 91 23:42:54 GMT
  426.  
  427.     From fa.think-c-outbound-request%ics.uci.edu@caen.engin.umich.edu Wed Sep  4 16:45:14 1991
  428.     Received: from caen.engin.umich.edu by mondo.engin.umich.edu (NeXT-1.0 (From Sendmail 5.52)/mondo-1.0)
  429.         id AA02587; Wed, 4 Sep 91 16:45:09 GMT-0500
  430.     Received: from ics.uci.edu by caen.engin.umich.edu (5.64/1.35)
  431.         id 53c895e75.001024b; Wed, 4 Sep 91 16:39:19 -0400
  432.     Received: by ics.uci.edu id aa05065; 4 Sep 91 9:24 PDT
  433.     Received: from ics.uci.edu by ics.uci.edu id aa04180; 4 Sep 91 9:23 PDT
  434.     Received: from USENET by ics.uci.edu id aa04124; 4 Sep 91 9:20 PDT
  435.     From: fleabag@athena.mit.edu
  436.     Subject: disabled menu items, and the meaning of life
  437.     Message-Id: <9109041619.AA18784@e40-008-6.MIT.EDU>
  438.     Newsgroups: fa.think-c
  439.     Date: 4 Sep 91 16:20:04 GMT
  440.     To: think-c@ics.uci.edu
  441.     Status: O
  442.  
  443.  
  444.     hi all,
  445.  
  446.  
  447.     i've had quite the lesson this week.  as you read this,
  448.     see if you have a reasonable answer to the question
  449.     "what are disabled menu items for?".
  450.  
  451.     first experience:  for whatever reason, i chose the
  452.     disabled "Open Selection" menu item in Think C 5.
  453.     no selection was chosen, just a friendly blinking
  454.     cursor.  so Think churns for a moment and tells me
  455.     that "file "" not found".  this only works when using
  456.     the mouse to select the menu item, not command-D.  (it
  457.     also works in Think C 4.)  why does Think allow you to
  458.     choose a disabled menu item?
  459.  
  460.     next experience:  now i'm curious.  while in the finder
  461.     (7.0), all windows closed and no items on the desktop
  462.     selected, the "view" menu and all of its items are dimmed.
  463.     i have left a few straggling icons on the desktop, but
  464.     no windows.  so, with the mouse i choose "by name" from
  465.     the disabled menu.  all i can say is, well, try it and
  466.     tell me it ain't a bug.  not only is the disabled menu item
  467.     usable, but it does wrong things to the screen.  all of the
  468.     "view" menu items work similarly.
  469.  
  470.     by this time i've come to question all that i hold sacred.
  471.     what really are disabled menu items for?  at the state of
  472.     my current project, i have so many bugs that i just might
  473.     take them all and give them disabled menu items!
  474.  
  475.     final experience:  i'm running a version of my project which
  476.     was compiled with Think C 4 and TCL 1.0 (it'll be weeks
  477.     before it runs smoothly with 5.0 and 1.1).  for the same
  478.     reasons of disbelieving curiosity i choose a menu item which
  479.     i disable via gBartender->DisableCmd().  need i say more?
  480.     i was treated to an error which i had tried to make impossible
  481.     by following both apple's and Think's guidelines.
  482.  
  483.     WHAT IS GOING ON HERE?????
  484.  
  485.     i wish i were less angry about this.
  486.  
  487.     :jeff bellsey
  488.     fleabag@athena.mit.edu
  489.  
  490.  
  491.  
  492. 
  493. 
  494. Path: ucivax!gateway
  495. From: rudman@mondo.engin.umich.edu (Daniel Edward Rudman)
  496. Subject: Re: disabled menu items, and the meaning of life
  497. Message-ID: <9109050045.AA05752@mondo.engin.umich.edu>
  498. Newsgroups: fa.think-c
  499. Lines: 77
  500. Date: 4 Sep 91 23:46:16 GMT
  501.  
  502.     From fa.think-c-outbound-request%ics.uci.edu@caen.engin.umich.edu Wed Sep  4 16:45:14 1991
  503.     Received: from caen.engin.umich.edu by mondo.engin.umich.edu (NeXT-1.0 (From Sendmail 5.52)/mondo-1.0)
  504.         id AA02587; Wed, 4 Sep 91 16:45:09 GMT-0500
  505.     Received: from ics.uci.edu by caen.engin.umich.edu (5.64/1.35)
  506.         id 53c895e75.001024b; Wed, 4 Sep 91 16:39:19 -0400
  507.     Received: by ics.uci.edu id aa05065; 4 Sep 91 9:24 PDT
  508.     Received: from ics.uci.edu by ics.uci.edu id aa04180; 4 Sep 91 9:23 PDT
  509.     Received: from USENET by ics.uci.edu id aa04124; 4 Sep 91 9:20 PDT
  510.     From: fleabag@athena.mit.edu
  511.     Subject: disabled menu items, and the meaning of life
  512.     Message-Id: <9109041619.AA18784@e40-008-6.MIT.EDU>
  513.     Newsgroups: fa.think-c
  514.     Date: 4 Sep 91 16:20:04 GMT
  515.     To: think-c@ics.uci.edu
  516.     Status: RO
  517.  
  518.  
  519.     hi all,
  520.  
  521.  
  522.     i've had quite the lesson this week.  as you read this,
  523.     see if you have a reasonable answer to the question
  524.     "what are disabled menu items for?".
  525.  
  526.     first experience:  for whatever reason, i chose the
  527.     disabled "Open Selection" menu item in Think C 5.
  528.     no selection was chosen, just a friendly blinking
  529.     cursor.  so Think churns for a moment and tells me
  530.     that "file "" not found".  this only works when using
  531.     the mouse to select the menu item, not command-D.  (it
  532.     also works in Think C 4.)  why does Think allow you to
  533.     choose a disabled menu item?
  534.  
  535.     next experience:  now i'm curious.  while in the finder
  536.     (7.0), all windows closed and no items on the desktop
  537.     selected, the "view" menu and all of its items are dimmed.
  538.     i have left a few straggling icons on the desktop, but
  539.     no windows.  so, with the mouse i choose "by name" from
  540.     the disabled menu.  all i can say is, well, try it and
  541.     tell me it ain't a bug.  not only is the disabled menu item
  542.     usable, but it does wrong things to the screen.  all of the
  543.     "view" menu items work similarly.
  544.  
  545.     by this time i've come to question all that i hold sacred.
  546.     what really are disabled menu items for?  at the state of
  547.     my current project, i have so many bugs that i just might
  548.     take them all and give them disabled menu items!
  549.  
  550.     final experience:  i'm running a version of my project which
  551.     was compiled with Think C 4 and TCL 1.0 (it'll be weeks
  552.     before it runs smoothly with 5.0 and 1.1).  for the same
  553.     reasons of disbelieving curiosity i choose a menu item which
  554.     i disable via gBartender->DisableCmd().  need i say more?
  555.     i was treated to an error which i had tried to make impossible
  556.     by following both apple's and Think's guidelines.
  557.  
  558.     WHAT IS GOING ON HERE?????
  559.  
  560.     i wish i were less angry about this.
  561.  
  562.     :jeff bellsey
  563.     fleabag@athena.mit.edu
  564.  
  565.  
  566.  
  567.  
  568. ---------------
  569. The problem closely resembles a reported bug with Apple's unreleased utility,
  570. Magic Apple. Magic Apple, which is now outdated by Now Utilities 3.0's
  571. NowMenus and also by SuperMenu, used to allow you to place folders in the
  572. Apple Menu and work through the folders as pop-ups.
  573.  
  574. Apple's big bug allowed you to select disabled menus.
  575.  
  576. Remove the utility immediately and all will be better.
  577.  
  578. //Dan
  579. 
  580. 
  581. Path: ucivax!gateway
  582. From: mkelly@apple.com
  583. Subject: Re: disabled menu items, and the meaning of life
  584. Message-ID: <9109050027.AA26409@apple.com>
  585. In-Reply-To: Your message of 04 Sep 91 16:20:04 GMT.
  586.              <9109041619.AA18784@e40-008-6.MIT.EDU>
  587. Newsgroups: fa.think-c
  588. Lines: 18
  589. Date: 5 Sep 91 00:28:11 GMT
  590.  
  591.  
  592.  
  593. ...OK....  Do you have an extension called Magic Apple (by Fred Hollander,
  594. HandOff Corporation)?  If so, turn it off and restart.  You probably won't
  595. be able to select disabled menu items any more.  (If you can, then please
  596. let me know.  I'm under the impression that this phenomena is caused by
  597. Magic Apple, and Magic Apple alone.)
  598.  
  599. Personally, I can't live without Magic Apple, so until there's a new version
  600. of it, I'm just going to have to be careful about where I let the mouse
  601. button up.
  602.  
  603.  
  604. Mike.
  605. _____________________________________________________________________________
  606. Michael A. Kelly                                         Apple Computer, Inc.
  607. mkelly@apple.com                 Advanced Technology Group, Graphics Software
  608. _____________________________________________________________________________
  609. 
  610. 
  611. Path: ucivax!gateway
  612. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  613. Subject: Re: Floating Windows vs Windows
  614. Message-ID: <9109051103.aa28190@dcs.ed.ac.uk>
  615. Newsgroups: fa.think-c
  616. Lines: 38
  617. Date: 5 Sep 91 10:11:29 GMT
  618.  
  619. >What is the difference between floating windows and
  620. >normal windows?
  621.  
  622. The difference is that floating windows, er, float. A floating window
  623. generally provides a pallette of tools or options which you want visual
  624. access to continually. Hence, a floating window is always on top of other
  625. windows. There is still a notional top-window of the ordinary kind, and
  626. this still accepts mouse clicks and key events as if the floating window
  627. weren't there (assuming the floater is out of the way).
  628.  
  629. >When they must be used?
  630.  
  631. I presume you're asking about user interfaces. I've explained what I think
  632. is the main rationale. (I also use "sinking" windows which are always at
  633. the
  634. bottom and always active, for a different kind of interface.) One point:
  635. floating windows should vanish when the application goes into the
  636. background.
  637.  
  638. >Is there a
  639. >speed/memory factor that will make choose one over another.
  640.  
  641. I very much doubt it. If there *were* a speed/memory difference, that's not
  642. sufficient reason to choose. It's an interface issue, not a performance
  643. one.
  644.  
  645. >If you know C well and have never programmed on the Mac
  646. >would you recommend using TCL or write code directly in C.
  647.  
  648. I recommend reading through Inside Mac I and II for background on the
  649. Toolbox managers and routines, and the general way the machine works
  650. (graphics environments, resource and memory management, and so on). Having
  651. done that, I see no reason why you shouldn't just start with the TCL. I
  652. started with C and TransSkel, which was interesting but didn't teach me
  653. anything specifically important for TCL programming.
  654.  
  655.         Nick.
  656.  
  657. 
  658. 
  659. Path: ucivax!gateway
  660. From: fleabag@athena.mit.edu
  661. Subject: can of worms too big, please retreat...
  662. Message-ID: <9109060250.AA24884@e40-008-8.MIT.EDU>
  663. Newsgroups: fa.think-c
  664. Lines: 18
  665. Date: 6 Sep 91 02:50:43 GMT
  666.  
  667.  
  668. sorry all,
  669.  
  670. for those that haven't got word (hard to tell which responses
  671. came to me only or to the whole list),  the disabled menu item
  672. problem was indeed causes by that little devil "magic apple."
  673. (perhaps a magic apple with a chaotic good alignment ;)  i
  674. sheepishly retire into my corner, humbled and tired, requesting
  675. pardon in my continuing pursuit of the Truth of the User
  676. Interface.
  677.  
  678. and may all init's perish a horrible death!  (except the good
  679. ones).
  680.  
  681. :jeff bellsey
  682.  
  683. fleabag@athena.mit.edu
  684.  
  685. 
  686. 
  687. Path: ucivax!gateway
  688. From: carlos@wateol.uwaterloo.ca
  689. Subject: MacApp 2.xx with Think Pascal 3.02
  690. Message-ID: <9109062010.AA23264@UWaterloo.ca>
  691. Newsgroups: fa.think-c
  692. Lines: 10
  693. Date: 6 Sep 91 20:27:09 GMT
  694.  
  695. I have converted MacApp 2.0b to think pascal 3.02 using the supplied
  696. script.
  697. Is there a newer version of this script ? and if so, where can I get it
  698. from?
  699. Thanks in advance.
  700.  
  701. Carlos Bazzarella.
  702. University of Waterloo.
  703. carlos@wateol.UWaterloo.Ca
  704.  
  705. 
  706. 
  707. Path: ucivax!gateway
  708. From: rodrigo@cmsun.cmf.nrl.navy.mil
  709. Subject: (none)
  710. Message-ID: <9109070012.AA08453@cmsun.cmf.nrl.navy.mil>
  711. Newsgroups: fa.think-c
  712. Lines: 19
  713. Date: 7 Sep 91 01:34:42 GMT
  714.  
  715. I got my update to 5.0. I tried to run the new TCL demo
  716. in the NewClassDemo folder. However it was unable to compile.
  717. First I got a prototype error on CDialog.c in SetWRefcon
  718. on the second argument.
  719.  
  720. I changed that and kept going thinking that that on ewas a minor
  721. error. By the way I just put a long instead of the variable this.
  722. Iam not sure that this is correct but at least it kept compiling.
  723.  
  724. The major compiling error happened in CIconPane.c. Here all the
  725. definitions of objects and methods are different than in the
  726. CIconPane.h file. There are so many differences that I decided to
  727. write this message and see if someone else has solved this problems.
  728.  
  729. If somebody from Symantec is out there, can you explain what's wrong w
  730. with these new classes. Can you provide fixes so they can compile.
  731.  
  732. Thanks for your help.
  733.  
  734. 
  735. 
  736. Path: ucivax!gateway
  737. From: rodrigo@cmsun.cmf.nrl.navy.mil
  738. Subject: (none)
  739. Message-ID: <9109070132.AA08736@cmsun.cmf.nrl.navy.mil>
  740. Newsgroups: fa.think-c
  741. Lines: 8
  742. Date: 7 Sep 91 02:34:29 GMT
  743.  
  744. Please disregard my message about compiling errors in
  745. the NewClassDemo folder. I had AppMaker on the same path
  746. as Think C and there are routines for the Dialog Class which
  747. have the same name. I was compiling the AppMaker routines instead
  748. of the TCL.
  749.  
  750. Sorry about that.
  751.  
  752. 
  753. 
  754. Path: ucivax!gateway
  755. From: KTC0440CSCI%APSU.BITNET@cunyvm.cuny.edu (Kerry 'UPE' Cianos)
  756. Subject: Magic Apple
  757. Message-ID: <93E67BBFC0A006A2@APSU.BITNET>
  758. Newsgroups: fa.think-c
  759. X-VMS-To: IN%"think-c@ics.uci.edu"
  760. Lines: 11
  761. Date: 8 Sep 91 23:38:33 GMT
  762. X-Envelope-to: think-c@ics.uci.edu
  763.  
  764.  
  765.   I've heard about this neato hack Magic Apple.  Is this available
  766. somewhere??  FTP??  It sounds like a utility a could really use!  Thanks,
  767.  
  768.       Kerry
  769.  
  770.   ------------------------------------------------------------------------
  771.   Kerry Cianos, President                PS/2 = PS divided by 2 =
  772.   Impress Technologies                   half a computer, thats ok, OS/2
  773.   Email : ktc0440c@apsu.bitnet           is only half an operating system!
  774.  
  775. 
  776. 
  777. Path: ucivax!gateway
  778. From: EHYOUNK@mtus5.cts.mtu.edu
  779. Subject: unsubscribe
  780. Message-ID: <9109090633.aa27738@ics.uci.edu>
  781. Newsgroups: fa.think-c
  782. Lines: 6
  783. Date: 9 Sep 91 13:33:21 GMT
  784.  
  785. Please take me off the think c mailing list.
  786.  
  787. Thanks
  788.  
  789. Ed
  790.  
  791. 
  792. 
  793. Path: ucivax!gateway
  794. From: chuq@apple.com (Chuq Von Rospach -- Only here for the beer)
  795. Subject: Re:  Magic Apple
  796. Message-ID: <9109091545.AA09617@apple.com>
  797. Newsgroups: fa.think-c
  798. Lines: 8
  799. Date: 9 Sep 91 15:46:21 GMT
  800.  
  801.  
  802. >  I've heard about this neato hack Magic Apple.  Is this available
  803. >somewhere??  FTP??  It sounds like a utility a could really use!  Thanks,
  804.  
  805. It was an improperly released (and buggy) beta test version of a tool that's
  806. part of the commercial package HandOff II. If you want a copy, buy the
  807. package. If you have a copy, it's illegal.
  808.  
  809. 
  810. 
  811. Path: ucivax!gateway
  812. From: Mark.Alldritt@vancouver.osiware.bc.ca (Mark Alldritt)
  813. Subject: TCL Bug (?) in CObject::Copy
  814. Message-ID: <9109091397*Mark.Alldritt@Vancouver.osiware.bc.ca>
  815. Newsgroups: fa.think-c
  816. Lines: 16
  817. Date: 9 Sep 91 16:45:26 GMT
  818.  
  819. I have run into a problem with CObject::Copy.  This method is supposed to
  820. create a copy of its object instance and return a handle to the new copy
  821. to the caller.  When I use this method the handle returned does not point
  822. to an object.  In the debugger, the __cn() macro returns a blank string even
  823. though a valid handle (non-NULL) is returned, and when I try and use any
  824. methods from the object a failure handler is triggered.  I have checked that
  825. the object i'm copying is valid.
  826.  
  827. I think this problem exists in both TCL 1.0 and 1.1 as the consiquences of this
  828. problem were evident in my application before I switched to TCL 1.1.
  829.  
  830. Does anyone have any ideas?
  831.  
  832. Thanks in advance
  833. -Mark
  834.  
  835. 
  836. 
  837. Path: ucivax!gateway
  838. From: Mark.Alldritt@vancouver.osiware.bc.ca (Mark Alldritt)
  839. Subject: Menu font and size
  840. Message-ID: <9109091398*Mark.Alldritt@Vancouver.osiware.bc.ca>
  841. Newsgroups: fa.think-c
  842. Lines: 7
  843. Date: 9 Sep 91 17:16:02 GMT
  844.  
  845. I've been looking though inside Mac I-VI for a way to alter the font and point
  846. size for menus (specifically for popup menus) with no success.  Can someone
  847. please point me in the right direction?
  848.  
  849. Thanks in advance
  850.  
  851. -Mark
  852. 
  853. 
  854. Path: ucivax!gateway
  855. From: rdegenna@pollux.usc.edu (Raymond Degennaro)
  856. Subject: NewClassDemo bugs
  857. Message-ID: <CMM.0.90.2.684443191.rdegenna@pollux.usc.edu>
  858. Newsgroups: fa.think-c
  859. Lines: 5
  860. Date: 9 Sep 91 19:07:07 GMT
  861.  
  862. this isn't really a THINK C problem, but it's related.  i have THINK Pascal
  863. and i tried to run the NewClassDemo, and i recieved a compilation error on
  864. what appeared to be a perfectely good line and i could not get it to run at
  865. all.  However, if i built an application, everything worked fine. weird, eh?
  866.  
  867. 
  868. 
  869. Path: ucivax!gateway
  870. From: FABIO@applelink.apple.com ("Pettinati, Fabio")
  871. Subject: unsubscribe
  872. Message-ID: <684450930.8086117@AppleLink.Apple.COM>
  873. Newsgroups: fa.think-c
  874. Lines: 2
  875. Date: 9 Sep 91 21:20:52 GMT
  876.  
  877. Please remove my name from think-c mailing list.
  878.  
  879. 
  880. 
  881. Path: ucivax!gateway
  882. From: KTC0440CSCI%APSU.BITNET@cunyvm.cuny.edu (Kerry 'UPE' Cianos)
  883. Subject: MAgic and Scribble
  884. Message-ID: <4B0B03A120A0193B@APSU.BITNET>
  885. Newsgroups: fa.think-c
  886. X-VMS-To: IN%"think-c@ics.uci.edu"
  887. Lines: 11
  888. Date: 9 Sep 91 21:29:43 GMT
  889. X-Envelope-to: think-c@ics.uci.edu
  890.  
  891.  
  892.   Thanks for the info on Magic Apple - I'm gonna look into Now Utilities
  893. and Hand-Off II.  Thanks!
  894.  
  895.           - kerry
  896.  
  897.   ------------------------------------------------------------------------
  898.   Kerry Cianos, President                PS/2 = PS divided by 2 =
  899.   Impress Technologies                   half a computer, thats ok, OS/2
  900.   Email : ktc0440c@apsu.bitnet           is only half an operating system!
  901.  
  902. 
  903. 
  904. Path: ucivax!gateway
  905. From: mkelly@apple.com
  906. Subject: Re: Menu font and size
  907. Message-ID: <9109092158.AA05309@apple.com>
  908. In-Reply-To: Your message of 09 Sep 91 17:16:02 GMT.
  909.              <9109091398*Mark.Alldritt@Vancouver.osiware.bc.ca>
  910. Newsgroups: fa.think-c
  911. Lines: 44
  912. Date: 9 Sep 91 21:58:37 GMT
  913.  
  914.  
  915. >I've been looking though inside Mac I-VI for a way to alter the font and point
  916. >size for menus (specifically for popup menus) with no success.  Can someone
  917. >please point me in the right direction?
  918.  
  919. If you're using System 7, all you have to do is specify popupUseWFont in your
  920. call to NewControl (as in IM-VI, page 3-18).  If you're not using the standard
  921. popup CDEF, it's a little harder, since the problem becomes how to get
  922. PopupMenuSelect to use the port's font and style.  Since PopupMenuSelect
  923. always uses the system font, the only way I've found to change its behavior
  924. is to change the system font before the call to PopupMenuSelect, and change
  925. it back immediately after.  This goes something like this:
  926.  
  927. /* In Think C */
  928.  
  929. extern short SysFontFam : 0xBA6;
  930. extern short SysFontSize : 0xBA8;
  931.  
  932. short oldSysFontFam, oldSysFontSize;
  933.  
  934. ...
  935.  
  936. oldSysFontFam = SysFontFam;
  937. oldSysFontSize = SysFontSize;
  938.  
  939. SysFontFam = /* Insert your favorite font number here */
  940. SysFontSize = /* Insert your favorite font size here */
  941.  
  942. PopupMenuSelect( ... )
  943.  
  944. SysFontFam = oldSysFontFam;
  945. SysFontSize = oldSysFontSize;
  946.  
  947.  
  948.  
  949. This seems to work okay.  But then, I haven't tested it extensively.
  950. (Your mileage may vary.)
  951.  
  952.  
  953. Mike.
  954. _____________________________________________________________________________
  955. Michael A. Kelly                                         Apple Computer, Inc.
  956. mkelly@apple.com                 Advanced Technology Group, Graphics Software
  957. _____________________________________________________________________________
  958. 
  959. 
  960. Path: ucivax!gateway
  961. From: cavasin@bach.convex.com (Vince Cavasin)
  962. Subject: (none) (fwd)
  963. Message-ID: <9109092250.AA04465@bach.convex.com>
  964. X-Mailer: ELM [version 2.3 PL11]
  965. Newsgroups: fa.think-c
  966. Motto: "I have come here to chew bubble gum and kick ass, and I'm all out
  967.         of bubble gum."  --Roddy Piper, in _They Live_
  968. Lines: 33
  969. Date: 9 Sep 91 22:53:08 GMT
  970.  
  971.  
  972. This got delivered to me due to some sort of mail hemhorrage:
  973.  
  974. Forwarded message:
  975. > From fa.think-c-outbound-request@ics.uci.edu Fri Sep  6 21:05:30 1991
  976. > From: rodrigo@cmsun.cmf.nrl.navy.mil
  977. > Subject: (none)
  978. > Message-Id: <9109070012.AA08453@cmsun.cmf.nrl.navy.mil>
  979. > Newsgroups: fa.think-c
  980. > Date: 7 Sep 91 01:34:42 GMT
  981. > To: think-c@ics.uci.edu
  982. >
  983. > I got my update to 5.0. I tried to run the new TCL demo
  984. > in the NewClassDemo folder. However it was unable to compile.
  985. > First I got a prototype error on CDialog.c in SetWRefcon
  986. > on the second argument.
  987. >
  988. > I changed that and kept going thinking that that on ewas a minor
  989. > error. By the way I just put a long instead of the variable this.
  990. > Iam not sure that this is correct but at least it kept compiling.
  991. >
  992. > The major compiling error happened in CIconPane.c. Here all the
  993. > definitions of objects and methods are different than in the
  994. > CIconPane.h file. There are so many differences that I decided to
  995. > write this message and see if someone else has solved this problems.
  996. >
  997. > If somebody from Symantec is out there, can you explain what's wrong w
  998. > with these new classes. Can you provide fixes so they can compile.
  999. >
  1000. > Thanks for your help.
  1001. >
  1002. >
  1003.  
  1004. 
  1005. 
  1006. Path: ucivax!gateway
  1007. From: cavasin@bach.convex.com (Vince Cavasin)
  1008. Subject: (none) (fwd)
  1009. Message-ID: <9109092250.AA04520@bach.convex.com>
  1010. X-Mailer: ELM [version 2.3 PL11]
  1011. Newsgroups: fa.think-c
  1012. Motto: "I have come here to chew bubble gum and kick ass, and I'm all out
  1013.         of bubble gum."  --Roddy Piper, in _They Live_
  1014. Lines: 21
  1015. Date: 9 Sep 91 23:03:03 GMT
  1016.  
  1017. this too:
  1018.  
  1019. Forwarded message:
  1020. > From fa.think-c-outbound-request@ics.uci.edu Fri Sep  6 23:19:01 1991
  1021. > From: rodrigo@cmsun.cmf.nrl.navy.mil
  1022. > Subject: (none)
  1023. > Message-Id: <9109070132.AA08736@cmsun.cmf.nrl.navy.mil>
  1024. > Newsgroups: fa.think-c
  1025. > Date: 7 Sep 91 02:34:29 GMT
  1026. > To: think-c@ics.uci.edu
  1027. >
  1028. > Please disregard my message about compiling errors in
  1029. > the NewClassDemo folder. I had AppMaker on the same path
  1030. > as Think C and there are routines for the Dialog Class which
  1031. > have the same name. I was compiling the AppMaker routines instead
  1032. > of the TCL.
  1033. >
  1034. > Sorry about that.
  1035. >
  1036. >
  1037.  
  1038. 
  1039. 
  1040. Path: ucivax!gateway
  1041. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  1042. Subject: Re: Menu font and size
  1043. Message-ID: <199109100030.AA09596@tarski.cogsci.uiuc.edu>
  1044. Newsgroups: fa.think-c
  1045. Lines: 39
  1046. Date: 10 Sep 91 00:33:21 GMT
  1047.  
  1048. >I've been looking though inside Mac I-VI for a way to alter the font and point
  1049. >size for menus (specifically for popup menus) with no success.  Can someone
  1050. >please point me in the right direction?
  1051.  
  1052. Here is some code I use (doctored to be more general):
  1053.  
  1054. extern short SysFontFam : 0xBA6;
  1055. extern short SysFontSize : 0xBA8;
  1056. extern long LastSpExtra : 0xB4C;
  1057. extern long CurFMInput : 0x988;
  1058.  
  1059. long PopUpMenuDialogFont(MenuHandle theMenu, Point thePoint,
  1060.                          short theSelection, DialogPtr theDialog)
  1061. {
  1062.         long menuReturn;
  1063.  
  1064.         SysFontFam = theDialog->txFont;
  1065.         if(SysFontFam == applFont)
  1066.                 SysFontFam = ApFontID;
  1067.         SysFontSize = theDialog->txSize;
  1068.         CurFMInput = -1L;
  1069.         LastSpExtra = -1L;
  1070.         menuReturn = PopUpMenuSelect(theMenu, thePoint.v, thePoint.h,
  1071.                                      theSelection);
  1072.         SysFontFam = systemFont;
  1073.         SysFontSize = 0;
  1074.         CurFMInput = -1L;
  1075.         LastSpExtra = -1L;
  1076.         return menuReturn;
  1077. }
  1078.  
  1079. pr
  1080. --
  1081. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  1082. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  1083. System manager - Cognitive Science Group, Beckman Institute, UIUC
  1084. Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
  1085. BITNET (if no other way) : FREE0285@UIUCVMD
  1086.  
  1087. 
  1088. 
  1089. Path: ucivax!gateway
  1090. From: mkelly@apple.com
  1091. Subject: What bugs are there (really) in Think C 5?
  1092. Message-ID: <9109100053.AA00168@apple.com>
  1093. Newsgroups: fa.think-c
  1094. Lines: 16
  1095. Date: 10 Sep 91 00:55:58 GMT
  1096.  
  1097.  
  1098.  
  1099. OK, I'm about to start converting an important project from Think C 4.0.5
  1100. to Think C 5.0.  I've noticed several bug reports on c.s.m.p., but I'm not
  1101. sure which ones were really bugs and which were just programmer error.
  1102.  
  1103. Are there any actual bugs in Think C or the class library?  Are there any
  1104. particularly nasty new features I should watch out for?
  1105.  
  1106. Thanks,
  1107.  
  1108. Mike.
  1109. _____________________________________________________________________________
  1110. Michael A. Kelly                                         Apple Computer, Inc.
  1111. mkelly@apple.com                 Advanced Technology Group, Graphics Software
  1112. _____________________________________________________________________________
  1113. 
  1114. 
  1115. Path: ucivax!gateway
  1116. From: amun@midway.uchicago.edu (james frederick amundson)
  1117. Subject: Bug and question
  1118. Message-ID: <CMM.0.90.2.684474176.amun@quads.uchicago.edu>
  1119. Newsgroups: fa.think-c
  1120. Lines: 20
  1121. Date: 10 Sep 91 03:46:24 GMT
  1122.  
  1123. I've seen many reports of bugs in Think C 5.0 lately.  It seems that most of
  1124. them are really misunderstandings about the features of a C standard created
  1125. by a committee.  I'm pretty confident my bug is legit, however.  When
  1126. optimization is on all of the local floating point variables in my subroutine
  1127. are assigned to the same location, be it an address or a register.  I
  1128. certainly hope this isn't a feature of ANSI C. 8-)
  1129.  
  1130. Is the above bug already documented?  If not, I will try to isolate the
  1131. specifics.  (Is anyone from Symantec listening?)
  1132.  
  1133. My question arises from trying to trace down this bug. If I declare
  1134.     double x;
  1135. and I want to see where it was assigned, I type
  1136.     &x
  1137. in the debugger.  This gives me an address UNLESS x is assigned to a register.
  1138. How do I figure out which register x is assigned to in the latter case? Thanks
  1139. to anyone who can help.
  1140.  
  1141. --Jim Amundson
  1142.   amun@midway.uchicago.edu
  1143. 
  1144. 
  1145. Path: ucivax!jhummel
  1146. From: jhummel@wave.ics.uci.edu (Joseph Edward Hummel)
  1147. Subject: Re: Bug and question
  1148. Nntp-Posting-Host: wave.ics.uci.edu
  1149. Message-ID: <28CC4F66.21486@ics.uci.edu>
  1150. Newsgroups: fa.think-c
  1151. Reply-To: jhummel@ics.uci.edu (Joseph Edward Hummel)
  1152. Organization: UC Irvine Department of ICS
  1153. Lines: 24
  1154. Date: 10 Sep 91 04:51:50 GMT
  1155. References: <CMM.0.90.2.684474176.amun@quads.uchicago.edu>
  1156.  
  1157. In article <CMM.0.90.2.684474176.amun@quads.uchicago.edu> amun@midway.uchicago.edu (james frederick amundson) writes:
  1158. >I've seen many reports of bugs in Think C 5.0 lately.  It seems that most of
  1159. >them are really misunderstandings about the features of a C standard created
  1160. >by a committee.  I'm pretty confident my bug is legit, however.  When
  1161. >optimization is on all of the local floating point variables in my subroutine
  1162. >are assigned to the same location, be it an address or a register.  I
  1163. >certainly hope this isn't a feature of ANSI C. 8-)
  1164. >
  1165. >Is the above bug already documented?  If not, I will try to isolate the
  1166. >specifics.  (Is anyone from Symantec listening?)
  1167.  
  1168. I'd have to see the code, but this is perfectly legal for the compiler to
  1169. do IF at most one such variable is "live" (contains a value that will be
  1170. read in the future) at any given time.  The compiler is reusing the storage
  1171. for each different variable, since in this case only one variable is really
  1172. needed.
  1173.  
  1174. Can you post the source?
  1175.  
  1176.   - joe
  1177. --
  1178. Joe Hummel
  1179. ICS Graduate Student, UC Irvine
  1180. Internet: jhummel@ics.uci.edu
  1181. 
  1182. 
  1183. Path: ucivax!gateway
  1184. From: chrisj@emx.utexas.edu
  1185. Subject: Re: What bugs are there (really) in Think C 5?
  1186. Message-ID: <9109101440.AA08472@emx.utexas.edu>
  1187. Posted-Date: Tue, 10 Sep 1991 09:42:11 -0600
  1188. Newsgroups: fa.think-c
  1189. Lines: 36
  1190. Date: 10 Sep 91 14:54:59 GMT
  1191.  
  1192.  
  1193. The one bug I've run into is with the UnloadA4Seg call.  I was using it in
  1194. a large multi-segment cdev.  Basically, calling UnloadA4Seg tends to crash
  1195. the machine, particularly if heap scrambling is enabled at the time.
  1196. Sometimes the crash occurs the first time UnloadA4Seg is called, sometimes
  1197. only after it's been called a dozen times.  I haven't seen any evidence
  1198. that this problem is with my code -- the exact same code compiled with
  1199. 4.0.x works great, and a lot of people use it routinely.
  1200.  
  1201. I sent off a more detailed description of this problem (which I didn't
  1202. think to keep a copy of) to Phil Shapiro at Symantec several weeks ago, but
  1203. haven't heard anything in reply.  Did the report ever reach you, Phil?
  1204.  
  1205. One other problem I ran into was a crash that consistently occurred
  1206. whenever I'd click on a class in the class browser to try to get at the
  1207. pop-up menu of methods.  I was using 32 bit addressing and virtual memory
  1208. at the time, but I believe that I narrowed the problem down to the 32 bit
  1209. addressing (I really wish I'd kept a copy of that problem report I sent).
  1210. Oddly enough, removing all INITs, cdevs and RDEVs from my System 7 setup
  1211. didn't help, but booting with the shift key held down *did* fix the
  1212. problem.  So, this problem may not be in THINK C 5, but in, perhaps,
  1213. something like the EtherNet driver in the System file, which would have
  1214. been disabled by the shift key trick, but not by the removal of all INITs,
  1215. cdevs and RDEVs.  It's pretty weird interaction, in any case.
  1216.  
  1217. If anyone can shed any light on these problems (particularly the
  1218. UnloadA4Seg matter), I'd appreciate it.
  1219.  
  1220. ----Chris (Johnson)
  1221. ----chrisj@emx.utexas.edu
  1222.  
  1223. P.S.  Apart from these problems, I've been extremely pleased with 5.0.
  1224.  
  1225.  
  1226.  
  1227.  
  1228. 
  1229. 
  1230. Path: ucivax!gateway
  1231. From: amun@midway.uchicago.edu (james frederick amundson)
  1232. Subject: Re: Bug and question
  1233. Message-ID: <CMM.0.90.2.684520901.amun@quads.uchicago.edu>
  1234. Newsgroups: fa.think-c
  1235. Lines: 8
  1236. Date: 10 Sep 91 16:42:11 GMT
  1237.  
  1238. Everyone,
  1239.  
  1240. Good grief.  My mistake.  The compiler was assigning variables in a legal
  1241. way.  I had a seperate bug that was clouding my judgement.  My apologies.
  1242.  
  1243. Thanks to those who responded.
  1244.  
  1245. --Jim Amundson
  1246. 
  1247. 
  1248. Path: ucivax!gateway
  1249. From: siegel@world.std.com (Rich Siegel)
  1250. Subject: Re: What bugs are there (really) in Think C 5?
  1251. Message-ID: <9109101822.AA08096@world.std.com>
  1252. Newsgroups: fa.think-c
  1253. Lines: 4
  1254. Date: 10 Sep 91 18:22:49 GMT
  1255.  
  1256. Both of the things you report have been fixed internally, and will be included
  1257. in an upcoming patch.
  1258.  
  1259. R.
  1260. 
  1261. 
  1262. Path: ucivax!gateway
  1263. From: infoserv!apple!well!crunch@zardoz.uucp (John Draper)
  1264. Subject: I volunteer to make up think c 5.0 bug list.
  1265. Message-ID: <9109111933.AA03311@well.sf.ca.us>
  1266. Newsgroups: fa.think-c
  1267. Lines: 19
  1268. Date: 12 Sep 91 09:56:18 GMT
  1269.  
  1270. Now that Think C 5.0 is officially released,  and  people are already
  1271. finding bugs in it,   I think that it would be a good idea for someone
  1272. (I volunteer) to compile up a list of the current known bugs and problems
  1273. into a single file,  then post it to the mailing list for those people
  1274. who have not yet worked with it.
  1275.  
  1276. I propose that I post this bug list every month or so,   and I am in
  1277. the process of collecting them now,  based on the reports that people
  1278. have posted so far.   Naturally,  I cannot verify the authenticity of
  1279. the bugs,  but perhaps Phil Shipero can help out with this in some way.
  1280.  
  1281. My question to the group is...  Has anyone already done this??   if so,
  1282. then would it be possible to share this information and work with me
  1283. in generating this list??
  1284.  
  1285. I think this will help the group as a whole and especially those who
  1286. are just now getting the upgrade and plan on using it.
  1287.  
  1288. John Draper
  1289. 
  1290. 
  1291. Path: ucivax!gateway
  1292. From: ceverba1@cc.swarthmore.edu
  1293. Subject: Returned mail: User unknown
  1294. Message-ID: <9109121239.AA15622@oak.cc.swarthmore.edu>
  1295. Newsgroups: fa.think-c
  1296. Lines: 50
  1297. Date: 12 Sep 91 12:39:44 GMT
  1298.  
  1299. >Subject: Think C v5 problems
  1300. >
  1301. >Dear Symantec:
  1302. >My students and I have used Think C for years, but the recent upgrade to
  1303. >v.5 (along with System 7.0) has got me stumped (I'm a registered user,
  1304. >serial number 05000-19500-17339-82268).  The following compiler errors
  1305. >occur in code that worked fine prior to version 5.0:
  1306. >
  1307. >    Argument to functions 'BeginUpdate' and 'EndUpDate' does not match
  1308. >prototype:
  1309. >
  1310. >    case updateEvt:
  1311. >                BeginUpdate( gTheEvent.message );
  1312. >                UpDateWindow( gMainWindow );
  1313. >                EndUpdate( gTheEvent.message );
  1314. >                break;
  1315. >
  1316. >    Last argument to function 'GetNewDialog' does not match prototype:
  1317. >
  1318. >    mSimulationDialog = GetNewDialog( SIMULATION_DLOG, NIL_POINTER,
  1319. >MOVE_TO_FRONT );
  1320. >
  1321. >and also in GetNewWindow, where MOVE_TO_FRONT is just -1L
  1322. >
  1323. >    Invalid redeclaration of SetColor:
  1324. >
  1325. >    SetColor( float intensRatio)
  1326. >{
  1327. >    if (intensRatio > 0.50 )         ForeColor( redColor );
  1328. >    else if (intensRatio > 0.25)    ForeColor( magentaColor );
  1329. >    else if (intensRatio > 0.125)    ForeColor( yellowColor );
  1330. >    else if (intensRatio > 0.0625)    ForeColor( greenColor );
  1331. >    else if (intensRatio > 0.03125)    ForeColor( cyanColor );
  1332. >    else                             ForeColor( blueColor );
  1333. >}
  1334. >
  1335. >    syntax error:
  1336. >
  1337. >GetDoubleIn( DialogPtr theDialog, int itemNumber, double *theDouble,
  1338. >Boolean *error );
  1339. >
  1340. >Please suggest what may be wrong here.  Have the prototypes or syntax
  1341. >changed?
  1342. >
  1343. >Erich Carr Everbach
  1344. >(215) 328-8079
  1345. >
  1346. >
  1347. >
  1348.  
  1349. 
  1350. 
  1351. Path: ucivax!gateway
  1352. From: rsfinn@concerto.lcs.mit.edu ("Russell S. Finn")
  1353. Subject: Re: Think C v5 problems
  1354. Message-ID: <9109121841.AA12251@concerto.lcs.mit.edu>
  1355. In-Reply-To: Your message of "12 Sep 91 12:39:44 GMT."
  1356.              <9109121239.AA15622@oak.cc.swarthmore.edu>
  1357. Newsgroups: fa.think-c
  1358. Lines: 58
  1359. X-Mts: smtp
  1360. Date: 12 Sep 91 18:49:33 GMT
  1361.  
  1362. > Dear Symantec:
  1363. > My students and I have used Think C for years, but the recent upgrade to
  1364. > v.5 (along with System 7.0) has got me stumped...
  1365.  
  1366. I'm not from Symantec, but perhaps I can help...
  1367.  
  1368. > The following compiler errors
  1369. > occur in code that worked fine prior to version 5.0:
  1370. >
  1371. >     Argument to functions 'BeginUpdate' and 'EndUpDate' does not match
  1372. > prototype:
  1373. >
  1374. >                 BeginUpdate( gTheEvent.message );
  1375. >                 UpDateWindow( gMainWindow );
  1376. >                 EndUpdate( gTheEvent.message );
  1377.  
  1378. THINK C 5.0 is much stricter about checking arguments to Toolbox
  1379. routines than it used to be.  Previously, only the size of the
  1380. argument mattered; now, the type must match as well.  In this case,
  1381. BeginUpdate and EndUpdate need to have pointers (to a window) as
  1382. arguments, so you must cast the event record's "message" field, which
  1383. is a long, to a pointer type:
  1384.  
  1385.     BeginUpdate ((WindowPtr) gTheEvent.message);
  1386.     ...
  1387.     EndUpdate ((WindowPtr) gTheEvent.message);
  1388.  
  1389. >     Last argument to function 'GetNewDialog' does not match prototype:
  1390.  
  1391. This is the same problem.  Try redefining MOVE_TO_FRONT as
  1392. "((WindowPtr) -1".  Note that these issues *are* discussed in the
  1393. THINK C 5.0 manual; check Appendix A, which discusses upgrading to 5.0
  1394. from 4.0 (I think; I don't have the manual in front of me).
  1395.  
  1396. >     Invalid redeclaration of SetColor:
  1397.  
  1398. SetColor is a Color QuickDraw routine, which is now defined as an
  1399. inline function in QuickDraw.h (which in turn is included in
  1400. MacHeaders).  As you can't redefine functions which have previously
  1401. been defined as inline, you'll probably have to rename this function.
  1402.  
  1403. >     syntax error:
  1404. >
  1405. > GetDoubleIn( DialogPtr theDialog, int itemNumber, double *theDouble,
  1406. > Boolean *error );
  1407.  
  1408. As mentioned in the manual, THINK C 5.0 follows the stricter ANSI
  1409. rules about declaring prototypes; you must specify a return value in a
  1410. prototype.  Here you'll want either "int" (which is what 4.0 assumed
  1411. you meant) or "void" (which is probably what you really meant).
  1412.  
  1413. Hope this helps.  (And do read through the new manuals -- they're
  1414. greatly improved, apart from a distressingly large number of typos.)
  1415.  
  1416. -- Russell S. Finn
  1417. rsfinn@lcs.mit.edu
  1418.  
  1419.  
  1420. 
  1421. 
  1422. Path: ucivax!gateway
  1423. From: laborde@imag.fr
  1424. Subject: Name of CurResFile
  1425. Message-ID: <9109161438.AA21794@imag.imag.fr>
  1426. Newsgroups: fa.think-c
  1427. Lines: 16
  1428. Date: 16 Sep 91 14:39:41 GMT
  1429.  
  1430. In some application (Cabri-geometre indeed) I need to know the name of the
  1431. current opened resource file.
  1432. It exists a function CurResFile returning the path reference number of the
  1433. current opened resource file but I do not see any way from going from there
  1434. to the name of that file.
  1435. (High level or lowlevel file routines do not help and I did not find
  1436. anything more using the newer SFSpec stuff.
  1437. Does somebody has an idea?
  1438.  
  1439. By the way who knows where it would be possible to have a description of
  1440. the way of implementing AppleEvents using Hypercard (>=2.1)?
  1441.  
  1442. Thank you for help
  1443.  Jean-Marie Laborde   laborde@imag.fr    BP 53x 38041 Grenoble cedex FRANCE
  1444.  (33) 76 51 46 10   (sec 76 51 46 16)   (Fax 76 51 45 55)
  1445.  
  1446. 
  1447. 
  1448. Path: ucivax!gateway
  1449. From: TLEAMING@gemini.sim.es.com (Taylor Leaming 801/582-5847 x3836)
  1450. Subject: Not recieving mail list at my end...broken?
  1451. Message-ID: <910916114913.30803247@GEMINI.SIM.ES.COM>
  1452. Newsgroups: fa.think-c
  1453. Lines: 25
  1454. Date: 16 Sep 91 17:49:19 GMT
  1455. X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
  1456.  
  1457. Hi,
  1458.  
  1459. I don't mean to burn up bandwidth with this message, but I haven't recieved a
  1460. single message from this mail list in over a week.  I'm trying to determine
  1461. if my mail system is bouncing messages or something.
  1462.  
  1463. Would several of you mind sending a new message to me (off-line) at:
  1464.  
  1465.         tleaming@gemini.sim.es.com
  1466.  
  1467. If you don't get a reply within a reasonable amount of time, would you mind
  1468. then giving me a call at 801/582-5847.  I'd like to talk to you and see if
  1469. I can get things straightened out.  This is asking a lot, but it would be
  1470. very helpful and much appreciated.
  1471.  
  1472. Thanks in advance,
  1473.  
  1474. Taylor
  1475.  
  1476. --------------------------------------------------------------------------
  1477. Taylor Leaming                                  tleaming@gemini.sim.es.com
  1478. Simulation Division
  1479. Evans & Sutherland Computer Corp.
  1480. SLC, UT                                                       801/582-5847
  1481.  
  1482. 
  1483. 
  1484. Path: ucivax!gateway
  1485. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  1486. Subject: Re: Name of CurResFile
  1487. Message-ID: <199109161821.AA16719@tarski.cogsci.uiuc.edu>
  1488. Newsgroups: fa.think-c
  1489. Lines: 27
  1490. Date: 16 Sep 91 18:24:37 GMT
  1491.  
  1492. >In some application (Cabri-geometre indeed) I need to know the name of the
  1493. >current opened resource file.
  1494.  
  1495. Try this:
  1496.  
  1497. OSErr GetResFileName(short refNum, Str255 fileName)
  1498. {
  1499.         FCBPBRec myFCPPB;
  1500.         OSErr errCode;
  1501.  
  1502.         myFCBPB.ioVRefNum = 0;
  1503.         myFCBPB.ioRefNum = refNum;
  1504.         myFCBPB.ioFCBIndx = 0L;
  1505.         errCode = PBGetFCBInfo(&myFCBPB, false);
  1506.         if(errCode == noErr)
  1507.                 BlockMove(myFCBPB.ioFCBFlNm, fileName, sizeof(Str255));
  1508.         return errCode;
  1509. }
  1510.  
  1511. pr
  1512. --
  1513. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  1514. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  1515. System manager - Cognitive Science Group, Beckman Institute, UIUC
  1516. Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
  1517. BITNET (if no other way) : FREE0285@UIUCVMD
  1518.  
  1519. 
  1520. 
  1521. Path: ucivax!gateway
  1522. From: perm@emil.csd.uu.se (Per Mildner)
  1523. Subject: Name of CurResFile
  1524. Message-ID: <9109162050.AA14971@emil.CSD.UU.SE>
  1525. In-Reply-To: laborde@imag.fr's message of 16 Sep 91 14:39:41 GMT <9109161438.AA21794@imag.imag.fr>
  1526. Newsgroups: fa.think-c
  1527. Lines: 33
  1528. Date: 16 Sep 91 20:50:57 GMT
  1529.  
  1530.  
  1531. Getting The name of the current open resource file:
  1532. This is from working Think C 4.05 code. ioNamePtr should point to a
  1533. Str255 allocated by the caller. The name and the ioVRefNum is returned.
  1534.  
  1535. OSErr
  1536. application_file_spec(Str255* ioNamePtr, short* ioVRefNumPtr)
  1537. {    FCBPBRec pb = {0 };
  1538.     pb.ioCompletion = 0;
  1539.     pb.ioVRefNum = 0;
  1540.     pb.ioRefNum = CurResFile();    /* will be the current
  1541.                                            application if no other
  1542.                                            resource open */
  1543.     pb.ioFCBIndx = 0;
  1544.     pb.ioNamePtr = (StringPtr)ioNamePtr;
  1545.     if (noErr != (lastErr = PBGetFCBInfo(&pb, false /* !async */)))
  1546.         return lastErr;
  1547.     *ioVRefNumPtr = pb.ioVRefNum;
  1548.     return noErr;
  1549. }
  1550.  
  1551. AppleEvents and HyperCard 2.1:
  1552.  
  1553. There is a Release note for HyperCard 2.1, it describes
  1554. simple uses of the built in AppleEvents suppport. (e.g. sending
  1555. scripts to other HC applications) More advanced use requires
  1556. XCMDS which also is available from various sources.
  1557.  
  1558. Hope this helps. (I can send the HC 2.1 release notes if you haven't
  1559. already seen it.
  1560.  
  1561. Regards,
  1562. Per Mildner perm@CSD.UU.SE
  1563. 
  1564. 
  1565. Path: ucivax!gateway
  1566. From: eplunix!mrn@eddie.mit.edu (MarkNilsn)
  1567. Subject: DragHook
  1568. Message-ID: <9109170658.AA14275@EDDIE.MIT.EDU>
  1569. Newsgroups: fa.think-c
  1570. Lines: 91
  1571. Date: 17 Sep 91 06:58:45 GMT
  1572.  
  1573. Hi folks,
  1574.  
  1575. I need some help sorting something out.  I am using the DragHook global
  1576. variable to store a function to be called when the user modifies the
  1577. size or position of a window.  IM volI says if I store a pointer to a
  1578. function in the global variable DragHook it will be called repeatedly
  1579. while the user drags the window.  It goes on to say that the function
  1580. will be called with no parameters.  Fine.  I can work with that.
  1581.  
  1582. So here is what happens.  I get into my event loop.  Do a mouseDown in
  1583. the drag bar and jump into the debugger ( I have it set up to do that ).
  1584. When I start to step through my code, I get an illegal instruction.
  1585.  
  1586. For those of you who have done this or think you can help me out, please
  1587. bear with the following code I have anotated with the problems.
  1588.  
  1589. By the way I am running think C 4.0.
  1590.  
  1591.  
  1592. This is the function I want called.
  1593.  
  1594. DragHookGetEventTimerEvents()
  1595. /* this proc gets stored in the DragHook ptr */
  1596. {
  1597.     GetEventTimerEvents();
  1598. }
  1599.  
  1600.  
  1601. This is what installs it.
  1602.  
  1603.  
  1604. SetUpDragHook()
  1605. {
  1606.     DragHook = DragHookGetEventTimerEvents;
  1607. }
  1608.  
  1609.  
  1610. This is on the recieving end of DragHookGetEventTimerEvents().
  1611. On a normal call HistogInfoPtr would have something valid in it.  It
  1612. works just fine normaly.  When it is called from DragHook HistogInfoPtr
  1613. is NULL and gets trapped by the if satement.
  1614.  
  1615. Basicly what I try to do is get the front window.  Exract the refcon
  1616. that has the valid data and run with it.  Everything works fine
  1617. until I call ETUpdateBuff.  I either hang or get an illegal instruction
  1618. message from the debugger.
  1619.  
  1620.  
  1621. GetEventTimerEvents(HistogInfoPtr)
  1622. struct    HistogInfo    *HistogInfoPtr;
  1623. {
  1624.     /* updated the Main Buffer and then the private Buffers from the */
  1625.     /* event Timer.  You can past any HistoInfoPtr in the list */
  1626.     /* vars for data and stuff */
  1627.  
  1628.     int numgotten;
  1629.     WindowPtr    TempW;
  1630.  
  1631.     if(HistogInfoPtr == NULL) /* ie it was called with DragHook */
  1632.         {
  1633.         TempW = FrontWindow(); /* I need to find the window */
  1634.         HistogInfoPtr = (struct HistogInfo *)GetWRefCon(TempW);
  1635.         Debugger();
  1636.         }
  1637.     /*fill buff and write to fp*/
  1638.     numgotten =
  1639. ETUpdatebuff(*(HistogInfoPtr)->FileHandle,HistogInfoPtr->MainBuffer);
  1640.  
  1641.     /* now cycle through all hystograms an update private bin counts */
  1642.     UpDatePrivateBuffers(HistogInfoPtr,numgotten);
  1643. }
  1644.  
  1645. Thanks for reading this far.  Everything has been working fine with
  1646. these functions.  I am sure ther is no obvious inherent bug  ;).
  1647.  
  1648. I have tried several other solutions with static and global variables
  1649. and that even looks stanger.  When I type the name of the variable into
  1650. the debugger it finds it but the value is 0.  This was true for statics
  1651. as well as Globals.
  1652.  
  1653. Well, thats it.  I hope I'm not wasting bandwidth by overlooking
  1654. something obvious.  Any hints will be appreciated.
  1655.  
  1656. --Mark.
  1657.  
  1658. PS. I just read over the letter and remembered that all the DragHook
  1659. stuff was in the "Assembly Language Note" parts of IM.  Do I need some
  1660. glue?  I've done a bit of 68000 asm but I should be able to do this in
  1661. C, right?
  1662.  
  1663. Thanks again.
  1664. 
  1665. 
  1666. Path: ucivax!gateway
  1667. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  1668. Subject: Re: Name of CurResFile
  1669. Message-ID: <199109171405.AA17406@tarski.cogsci.uiuc.edu>
  1670. Newsgroups: fa.think-c
  1671. Lines: 25
  1672. Date: 17 Sep 91 14:08:31 GMT
  1673.  
  1674. My sincerest apologies for my posting of a piece of garbage code yesterday.
  1675. It was completely in error and will certainly not do what I said it would.
  1676. This is the correct version.
  1677.  
  1678. Again, I am very sorry, and embarassed. Thanks to Edward Huff for pointing
  1679. this out.
  1680.  
  1681. OSErr GetResFileName(short refNum, Str255 fileName)
  1682. {
  1683.         FCBPBRec myFCBPB;
  1684.         OSErr errCode;
  1685.  
  1686.         myFCBPB.ioNamePtr = fileName;
  1687.         myFCBPB.ioVRefNum = 0;
  1688.         myFCBPB.ioRefNum = refNum;
  1689.         myFCBPB.ioFCBIndx = 0L;
  1690.         return(PBGetFCBInfo(&myFCBPB, false));
  1691. }
  1692. --
  1693. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  1694. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  1695. System manager - Cognitive Science Group, Beckman Institute, UIUC
  1696. Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
  1697. BITNET (if no other way) : FREE0285@UIUCVMD
  1698.  
  1699. 
  1700. 
  1701. Path: ucivax!gateway
  1702. From: dak@sq.com
  1703. Subject: Re: Not recieving mail list at my end...broken?
  1704. Message-ID: <m0kMgdj-0000XiC@sq.sq.com>
  1705. In-reply-to: Your message of "Mon, 16 Sep 91 13:49:19 EDT."
  1706.              <910916114913.30803247@GEMINI.SIM.ES.COM>
  1707. Newsgroups: fa.think-c
  1708. Orig-To: Taylor Leaming 801/582-5847 x3836 <TLEAMING@gemini.sim.es.com>
  1709. Lines: 18
  1710. Date: 17 Sep 91 15:27:57 GMT
  1711.  
  1712.  
  1713. > Hi,
  1714. >
  1715. > I don't mean to burn up bandwidth with this message, but I haven't recieved a
  1716. > single message from this mail list in over a week.  I'm trying to determine
  1717. > if my mail system is bouncing messages or something.
  1718.  
  1719. Your address is a little odd in your mail header; I wonder if that is
  1720. causing problems with auto-reply?
  1721.  
  1722. I've been getting the mailing list, although it's been light.
  1723.  
  1724. Regards,
  1725. Dak
  1726. --
  1727. David A. 'Dak' Keldsen of SoftQuad, Inc. email: dak@sq.com  phone: 416-239-4801
  1728. "Just roll the dice and accept this as a tragic turn of events, OK?"
  1729.     -- Calvin and Hobbes
  1730. 
  1731. 
  1732. Path: ucivax!gateway
  1733. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  1734. Subject: Text highlighting
  1735. Message-ID: <9109181415.aa17639@dcs.ed.ac.uk>
  1736. Newsgroups: fa.think-c
  1737. Lines: 12
  1738. Date: 18 Sep 91 20:07:45 GMT
  1739.  
  1740. A  quick query about the compiler (4.0.5, since Europe won't be getting 5.0
  1741. for ages yet):
  1742.  
  1743. I have a Radius greyscale display. The week before last, TC's editor was
  1744. highlighting text in grey, which was rather nice. It's stopped doing it now
  1745. - it just inverts. Anybody got any idea why this might have changed? All I
  1746. can think of is some change to the display CLUT or something, but most of
  1747. the rest of the system (the Standard File dialog and so on) still
  1748. highlights text in grey. I'd quite like it back...
  1749.  
  1750.         Nick.
  1751.  
  1752. 
  1753. 
  1754. Path: ucivax!gateway
  1755. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1756. Subject: Text highlighting
  1757. Message-ID: <9109190205.AA24488@chaos.cs.brandeis.edu>
  1758. In-Reply-To: Nick Rothwell's message of 18 Sep 91 20:07:45 GMT <9109181415.aa17639@dcs.ed.ac.uk>
  1759. Newsgroups: fa.think-c
  1760. Lines: 26
  1761. Date: 19 Sep 91 02:06:17 GMT
  1762.  
  1763. From: Nick Rothwell <nick@dcs.edinburgh.ac.uk>
  1764.  
  1765.    A quick query about the compiler (4.0.5, since Europe won't be
  1766.    getting 5.0 for ages yet):
  1767.  
  1768.    I have a Radius greyscale display. The week before last, TC's
  1769.    editor was highlighting text in grey, which was rather nice. It's
  1770.    stopped doing it now - it just inverts. Anybody got any idea why
  1771.    this might have changed? All I can think of is some change to the
  1772.    display CLUT or something, but most of the rest of the system (the
  1773.    Standard File dialog and so on) still highlights text in grey. I'd
  1774.    quite like it back...
  1775.  
  1776. THINK C 4.0.x will never use the hilite "color", you must have had
  1777. some INIT installed that provided this service (by patching
  1778. _InvertRect).  Two INITs that do this are 4Plus and one called ThC
  1779. Hilite! by Alex Chaffee.
  1780.  
  1781. 4Plus 1.4 is ftp'able from most places, and I can post ThC Hilite! if
  1782. anyone wants just the hilite feature -- I got it from CIS originally.
  1783.  
  1784.     -phil
  1785. ----
  1786.    Phil Shapiro                           Technical Support Analyst
  1787.    Language Products Group                     Symantec Corporation
  1788.         Internet: phils@chaos.cs.brandeis.edu
  1789. 
  1790. 
  1791. Path: ucivax!gateway
  1792. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1793. Subject: What bugs are there (really) in Think C 5?
  1794. Message-ID: <9109190302.AA25647@chaos.cs.brandeis.edu>
  1795. In-Reply-To: chrisj@emx.utexas.edu's message of 10 Sep 91 14:54:59 GMT <9109101440.AA08472@emx.utexas.edu>
  1796. Newsgroups: fa.think-c
  1797. Lines: 36
  1798. Date: 19 Sep 91 03:02:04 GMT
  1799.  
  1800. From: chrisj@emx.utexas.edu
  1801.  
  1802.    The one bug I've run into is with the UnloadA4Seg call.  I was
  1803.    using it in a large multi-segment cdev.  Basically, calling
  1804.    UnloadA4Seg tends to crash the machine, particularly if heap
  1805.    scrambling is enabled at the time.  Sometimes the crash occurs the
  1806.    first time UnloadA4Seg is called, sometimes only after it's been
  1807.    called a dozen times.  I haven't seen any evidence that this
  1808.    problem is with my code -- the exact same code compiled with 4.0.x
  1809.    works great, and a lot of people use it routinely.
  1810.  
  1811. There is a bug in the cache-clearing code that the code resource (and
  1812. DA) segment loader uses, that will cause a code resource to crash if a
  1813. segment is loaded after the main code resource is unlocked and moves.
  1814. I'll bet that this is the bug that you're running into.  We're working
  1815. on a patch to fix this, and it will be posted as soon as it's ready.
  1816.  
  1817.    One other problem I ran into was a crash that consistently occurred
  1818.    whenever I'd click on a class in the class browser to try to get at
  1819.    the pop-up menu of methods.
  1820.  
  1821. There's a 32 bit cleanliness bug in the Grep code that manifests if
  1822. THINK C gets loaded over the 16 meg watermark.  The browser uses a
  1823. grep string to search for method declarations, so that's where the
  1824. crash is coming from.
  1825.  
  1826. In any case, this is a known bug as well, and will be fixed in a
  1827. forthcoming patch.
  1828.  
  1829. I apologize for any inconvenience that these bugs have caused.
  1830.  
  1831.     -phil
  1832. ----
  1833.    Phil Shapiro                           Technical Support Analyst
  1834.    Language Products Group                     Symantec Corporation
  1835.         Internet: phils@chaos.cs.brandeis.edu
  1836. 
  1837. 
  1838. Path: ucivax!gateway
  1839. From: schabtac@stout.atd.ucar.edu (Adam Schabtach)
  1840. Subject: Re: Text highlighting
  1841. Message-ID: <9109190330.AA22419@stout.atd.ucar.EDU>
  1842. In-Reply-To: <9109190205.AA24488@chaos.cs.brandeis.edu>; from "Phil Shapiro" at Sep 19, 91 2:06 am
  1843. Newsgroups: fa.think-c
  1844. Lines: 10
  1845. Date: 19 Sep 91 03:31:26 GMT
  1846.  
  1847.  
  1848. > THINK C 4.0.x will never use the hilite "color", you must have had
  1849. > some INIT installed that provided this service (by patching
  1850.  
  1851. Out of curiosity, does TC v5.0 fix this? That was my main reason for
  1852. buying the upgrade (which I'm anxiously awaiting)... :-)
  1853.  
  1854. --Adam
  1855.  
  1856.  
  1857. 
  1858. 
  1859. Path: ucivax!gateway
  1860. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  1861. Subject: Re: Text highlighting
  1862. Message-ID: <9109191247.aa03725@dcs.ed.ac.uk>
  1863. Newsgroups: fa.think-c
  1864. Lines: 12
  1865. Date: 19 Sep 91 12:00:55 GMT
  1866.  
  1867. >THINK C 4.0.x will never use the hilite "color"
  1868.  
  1869. Ah. This explains why it wasn't working. I was running 4+ at the time, and
  1870. am running it now, but the highlight function seems to be broken right now.
  1871.  
  1872. I'll probably drop 4+ as I don't need all the mondo menu and command
  1873. features. All I want is command- and option-click to get menus of include
  1874. files and method names respectively. And colour highlight. I might just
  1875. wait and see what comes out of the box with TC5.0.
  1876.  
  1877.         Nick.
  1878.  
  1879. 
  1880. 
  1881. Path: ucivax!gateway
  1882. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  1883. Subject: UK release? (Re: What bugs are there (really) in Think C 5?)
  1884. Message-ID: <9109191248.aa03732@dcs.ed.ac.uk>
  1885. Newsgroups: fa.think-c
  1886. Lines: 10
  1887. Date: 19 Sep 91 12:00:55 GMT
  1888.  
  1889. >In any case, this is a known bug as well, and will be fixed in a
  1890. >forthcoming patch.
  1891.  
  1892. Looks like here in the UK we'll be getting the patches before we even get a
  1893. sighting of TC5.0. Anybody else in the UK heard anything yet? I think I'll
  1894. nag Symantec UK again to see what's going in. TC5.0 is now out in Sweden, I
  1895. hear.
  1896.  
  1897.         Nick.
  1898.  
  1899. 
  1900. 
  1901. Path: ucivax!gateway
  1902. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1903. Subject: Text highlighting
  1904. Message-ID: <9109191211.AA03920@chaos.cs.brandeis.edu>
  1905. In-Reply-To: Adam Schabtach's message of 19 Sep 91 03:31:26 GMT <9109190330.AA22419@stout.atd.ucar.EDU>
  1906. Newsgroups: fa.think-c
  1907. Lines: 16
  1908. Date: 19 Sep 91 12:11:12 GMT
  1909.  
  1910. From: Adam Schabtach <schabtac@stout.atd.ucar.edu>
  1911.  
  1912.    > THINK C 4.0.x will never use the hilite "color", you must have had
  1913.    > some INIT installed that provided this service (by patching
  1914.  
  1915.    Out of curiosity, does TC v5.0 fix this? That was my main reason for
  1916.    buying the upgrade (which I'm anxiously awaiting)... :-)
  1917.  
  1918. Yes, it's fixed.  However, the project window still uses black &
  1919. white.  I guess we're working on this one window type at a time :-).
  1920.  
  1921.     -phil
  1922. ----
  1923.    Phil Shapiro                           Technical Support Analyst
  1924.    Language Products Group                     Symantec Corporation
  1925.         Internet: phils@chaos.cs.brandeis.edu
  1926. 
  1927. 
  1928. Path: ucivax!gateway
  1929. From: cmiller@math.umass.edu (Craig Miller)
  1930. Subject: Wanted: Windows menu code (TCL)
  1931. Message-ID: <9109201410.AA08495@laurel.umass.edu>
  1932. Newsgroups: fa.think-c
  1933. Lines: 18
  1934. Date: 20 Sep 91 14:08:21 GMT
  1935.  
  1936. It seems to be that it would be fairly easy to
  1937. write code for a Windows menu that would be
  1938. fairly application independent.  CDesktop would
  1939. add and remove window titles from the Windows menu
  1940. when windows are added or removed from the desktop.
  1941. CApplication would ask CDesktop for a window
  1942. pointer and select that window in response to a
  1943. Windows menu selection.
  1944.  
  1945. Does anyone out there have code resembling the above?
  1946. I would appreciate a copy before I go out and re-invent
  1947. this particular wheel.  By the way, I am still using
  1948. TCL 4.0.5.
  1949.  
  1950. Craig D. Miller
  1951. Scientific Reasoning Research Institute (SRRI)
  1952. Hasbrouck Lab, University of Massachusetts, Amherst 01003
  1953. tel. 413-545-5865   cmiller@math.umass.edu
  1954. 
  1955. 
  1956. Path: ucivax!gateway
  1957. From: chuq@apple.com (Chuq Von Rospach -- Only here for the beer)
  1958. Subject: INIT Icon placement
  1959. Message-ID: <9109201514.AA26936@apple.com>
  1960. Newsgroups: fa.think-c
  1961. Lines: 15
  1962. Date: 20 Sep 91 15:15:12 GMT
  1963.  
  1964.  
  1965. Can anyone point me to documentation on how INITs figure out how to place
  1966. themselves on the screen? (I realize there's a pre-written CODE resource to
  1967. do this, but I'm interested in how the INITs pass information from what to
  1968. another -- low memory locations?
  1969.  
  1970. I want to create a CDEV that allows me to re-locate the place where the first
  1971. INIT is placed. I'm guessing that this would simply mean getting in first and
  1972. 'fixing' those memory locations, but I can't find any documentation on how
  1973. that stuff works. Any pointers would be appreciated.
  1974.  
  1975. (Why? Well, why not. I want to write a CDEV. Plus I have a two-monitor system
  1976. at home, with the menubar on my two-page, and this color monitor that I'd like
  1977. the icons to draw on during startup. Seems like a nice, useless hack).
  1978.  
  1979. 
  1980. 
  1981. Path: ucivax!gateway
  1982. From: johnsone@uxh.cso.uiuc.edu ("Erik A. Johnson")
  1983. Subject: Re: INIT Icon placement
  1984. Message-ID: <199109202022.AA14597@uxh.cso.uiuc.edu>
  1985. Newsgroups: fa.think-c
  1986. Lines: 32
  1987. Date: 20 Sep 91 20:22:49 GMT
  1988.  
  1989. Chuq Von Rospach <chuq@apple.com> writes:
  1990. > Can anyone point me to documentation on how INITs figure out how to place
  1991. > themselves on the screen? (I realize there's a pre-written CODE resource to
  1992. > do this, but I'm interested in how the INITs pass information from what to
  1993. > another -- low memory locations?
  1994. >
  1995. > I want to create a CDEV that allows me to re-locate the place where the first
  1996. > INIT is placed. I'm guessing that this would simply mean getting in first and
  1997. > 'fixing' those memory locations, but I can't find any documentation on how
  1998. > that stuff works. Any pointers would be appreciated.
  1999. >
  2000. > (Why? Well, why not. I want to write a CDEV. Plus I have a two-monitor system
  2001. > at home, with the menubar on my two-page, and this color monitor that I'd like
  2002. > the icons to draw on during startup. Seems like a nice, useless hack).
  2003.  
  2004. Sounds like a neat idea.  I'd suggest taking a look at the source code for
  2005. the rather infamous ShowINIT (or its more recent cousin, ShowINITFamily,
  2006. or some such).  If I remember correctly, the ShowINIT does use a 4 bytes in
  2007. low memory area to store two 2-byte, signed integers, one for horizontal and
  2008. one for vertical location for the next INIT's icon.  Each time ShowINIT is
  2009. used it plots the icon and then advances the location.
  2010.  
  2011. ShowINIT source used to be available on the various archives.  (If it
  2012. has disappeared, send me e-mail and I'll dig it up.)
  2013.  
  2014.  
  2015. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  2016. ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  2017. Graduate Student         \--------------------------------------------\     |
  2018. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  2019. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  2020.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  2021. 
  2022. 
  2023. Path: ucivax!gateway
  2024. From: infoserv!apple!well!bhamlin@zardoz.uucp ("Brian M. Hamlin")
  2025. Subject: class-less debugging story
  2026. Message-ID: <9109172343.AA03584@well.sf.ca.us>
  2027. Newsgroups: fa.think-c
  2028. Lines: 28
  2029. Date: 21 Sep 91 09:54:34 GMT
  2030.  
  2031. All -
  2032.  
  2033.   As a TCL user, I was debugging one fine California afternoon. A case
  2034. presented itself which seemed noteworthy, and a pain-in-the-arse at that-
  2035.  
  2036.   If class A uses instance var B, B uses instance var C, all objects, and
  2037. one sets a breakpoint in A, then using that miracle of a Debugger, tries
  2038. to look at the contents of obscure, special subClass of something class C,
  2039. one finds that unless source file of class A *explicitly* includes
  2040. header file C, the Debugger returns with a ".. unknown class 'C'" !?!
  2041.  
  2042.   Even though through nested includes header file C *is* included, the
  2043. Debugger cannot figure this out! Of course, headers of instance vars
  2044. are only included in source files now, since the much needed addition
  2045. of the "class N;" forward declaration construct used in headers. But still,
  2046. the is Bad.
  2047.  
  2048.   A really good example, and a lead in to another discussion, is the
  2049. TCL v1.1 case of using CDialogDirector, CDialog and subPanes. Execute
  2050. a command in the Director, and viola
  2051.   This is really a bummer, as we say here... Am I missing something?
  2052.  
  2053.   In the past, I have used the Debugger to resolve particularly gnarly
  2054. expressions during runtime, just to save derefs through half a dozen files
  2055. or so (since the compile/run/edit is fast. we can do this!!)
  2056.  
  2057.   Now I am handicapped in this ability. Any thoughts ??
  2058.  
  2059. 
  2060. 
  2061. Path: ucivax!gateway
  2062. From: cfejm@ux1.cts.eiu.edu (John Miller)
  2063. Subject: (none)
  2064. Message-ID: <9109211851.AA12555@ux1.cts.eiu.edu>
  2065. Newsgroups: fa.think-c
  2066. Lines: 13
  2067. Date: 21 Sep 91 18:51:18 GMT
  2068.  
  2069.  
  2070. Using the "factory settings," I find that project sizes after bringing
  2071. them up to date are considerably larger than documented (for the
  2072. sample demo) and much over twice as large as the same project (my own)
  2073. in TC 4.
  2074.  
  2075. Reactions?  Am I missing something?  Will a 3.3meg project that is far
  2076. from its eventual size be problematic?
  2077.  
  2078. Thanks,
  2079.  
  2080. John
  2081.  
  2082. 
  2083. 
  2084. Path: ucivax!gateway
  2085. From: nagel@ics.uci.edu (Mark Nagel)
  2086. Subject: ARCHIVE: MIDI Object
  2087. Message-ID: <12945.685572638@ics.uci.edu>
  2088. Newsgroups: fa.think-c
  2089. Reply-To: nagel@ics.uci.edu
  2090. Lines: 15
  2091. Date: 22 Sep 91 20:50:45 GMT
  2092. X-Phone: (714) 753-0414 x115
  2093.  
  2094.  
  2095. From: Adam Schabtach <schabtac@stout.atd.ucar.EDU>
  2096. Subject: CMIDI object for archives
  2097. Date: Tue, 17 Sep 91 22:05:23 MDT
  2098.  
  2099. Hello--
  2100.  
  2101. Attached to this message is a submission for the THINK C archives: a TCL
  2102. object for MIDI Manager operations. I have no connections with the author;
  2103. nor have I even tested the code. I'm passing it along in hopes that someone
  2104. will find it useful.
  2105.  
  2106. --Adam
  2107.  
  2108. [saved as: /mac/think-c/classes/cmidi.hqx; 20K]
  2109. 
  2110. 
  2111. Path: ucivax!gateway
  2112. From: jhummel@wave.ics.uci.edu (Joseph Edward Hummel)
  2113. Subject: Assembly language environment for the Mac?
  2114. Nntp-Posting-Host: wave.ics.uci.edu
  2115. Message-ID: <28DE8D2A.22926@ics.uci.edu>
  2116. Newsgroups: fa.think-c
  2117. Organization: UC Irvine Department of ICS
  2118. Lines: 13
  2119. Date: 24 Sep 91 00:56:10 GMT
  2120. Distribution: fa
  2121.  
  2122. [ Sorry this isn't a Think C question, but I thought you C hackers out there
  2123.   might have some ideas on this... ]
  2124.  
  2125. Hello all.  Can anyone suggest an assembly language environment for the
  2126. Mac (in particular,  a Mac Plus)?   I'm not looking for anything fancy, just
  2127. something to run in a student lab.  MPW is not an option, since I think it
  2128. requires more than a 1 Meg Mac.  Thanks in advance.
  2129.  
  2130.   - joe hummel
  2131. --
  2132. Joe Hummel
  2133. ICS Graduate Student, UC Irvine
  2134. Internet: jhummel@ics.uci.edu
  2135. 
  2136. 
  2137. Path: ucivax!gateway
  2138. From: sidar@rhi.hi.is
  2139. Subject: Re: Assembly language environment for the Mac?
  2140. Message-ID: <9109241054.AA04217@rhi.hi.is>
  2141. Newsgroups: fa.think-c
  2142. Lines: 36
  2143. Date: 24 Sep 91 10:55:01 GMT
  2144.  
  2145. - Hello all.  Can anyone suggest an assembly language environment for the
  2146. - Mac (in particular,  a Mac Plus)?   I'm not looking for anything fancy,
  2147. just
  2148. - something to run in a student lab.  MPW is not an option, since I think
  2149. it
  2150. - requires more than a 1 Meg Mac.  Thanks in advance.
  2151.  
  2152.         A few weeks ago, I found at the local university bookstore what you
  2153.  might need.It's called MAS - Macintosh Assembly System Basepak, runs on
  2154.  everything from a Plus and upwards, and runs efficiently in 350k of memory
  2155.  from a floppy disk!
  2156. I admit that I haven't used it much, but it seems to be a fully functional
  2157. interactive system for assembly language programming, which is basically
  2158. designed for the teaching of 68000 assembly programming.
  2159.  
  2160.   The environment is a bit like symantec's products, and it even has a
  2161. debugger.They also show how to use merge their object code with think-c
  2162. code.
  2163.  
  2164.  The publisher is Ramsoft in California , whom I have no afilliation
  2165.  whatsoever with.
  2166. This product is a small manual and a disk, and its ISBN number is
  2167. 0-669-16087-3. Your bookstore should be able to order it.
  2168.  
  2169. There is no price tag, and I can't remember excaclty what I paid, but
  2170. It was rather cheap.
  2171.  
  2172. --------------------------------------------------------------------------
  2173. Sigurdur Darri Skulason                                    sidar@rhi.hi.is
  2174.  
  2175. Software manager,
  2176. Hugsun inc.
  2177. Tech.Dev. Centre, Dunhagi 5, IS-107 Reykjavik, Iceland
  2178. Fax : 354-1-28801 Tel: 354-1-694951
  2179.  
  2180.  
  2181. 
  2182. 
  2183. Path: ucivax!gateway
  2184. From: ephraim@think.com (Ephraim Vishniac)
  2185. Subject: Re: Assembly language environment for the Mac?
  2186. Message-ID: <9109241305.AA08188@leander.think.com>
  2187. In-Reply-To: Your message of "24 Sep 91 00:56:10 GMT."
  2188.              <28DE8D2A.22926@ics.uci.edu>
  2189. Newsgroups: fa.think-c
  2190. Lines: 24
  2191. Date: 24 Sep 91 13:05:49 GMT
  2192.  
  2193.  
  2194.    From: Joseph Edward Hummel <jhummel@wave.ICS.UCI.EDU>
  2195.    Date: 24 Sep 91 00:56:10 GMT
  2196.  
  2197.    Hello all.  Can anyone suggest an assembly language environment for
  2198.    the Mac (in particular, a Mac Plus)?  I'm not looking for anything
  2199.    fancy, just something to run in a student lab.  MPW is not an option,
  2200.    since I think it requires more than a 1 Meg Mac.  Thanks in advance.
  2201.  
  2202. Well, Think C is a decent assembly language environment, though MPW's
  2203. assembler is better. Don't get the Consulair Development System (CDS),
  2204. it's old and decayed.
  2205.  
  2206. Think about economics of the situation, BTW. TC 5.0 will cost you (at
  2207. student discount) about $90/Mac. If your lab has all the software
  2208. licenses it should, you've probably spent several hundred dollars per
  2209. Mac on software. At current memory prices, an additional two megabytes
  2210. of memory for each Mac is about $60. So, it seems ridiculous to choose
  2211. your software according to what runs in one megabyte.
  2212.  
  2213. Ephraim Vishniac    ephraim@think.com   ThinkingCorp@applelink.apple.com
  2214.  Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142
  2215.         One of the flaws in the anarchic bopper society was
  2216.         the ease with which such crazed rumors could spread.
  2217. 
  2218. 
  2219. Path: ucivax!gateway
  2220. From: chrisj@emx.utexas.edu
  2221. Subject: Mounting AppleShare Servers
  2222. Message-ID: <9109241418.AA18884@emx.utexas.edu>
  2223. Posted-Date: Tue, 24 Sep 1991 09:20:31 -0600
  2224. Newsgroups: fa.think-c
  2225. Lines: 11
  2226. Date: 24 Sep 91 14:22:13 GMT
  2227.  
  2228. Can anyone provide me with, or tell me where to look for, source code for
  2229. mounting AppleShare file servers?  I've recently found several projects in
  2230. which such a feature would be valuable.  Ideally, it would require only the
  2231. server, volume, zone and user names along with a password for parameters.
  2232.  
  2233. Thanks in advance for any help!
  2234.  
  2235. ----Chris (Johnson)
  2236. ----chrisj@emx.utexas.edu
  2237. ----University of Texas at Austin Computation Center
  2238.  
  2239. 
  2240. 
  2241. Path: ucivax!gateway
  2242. From: russotto@eng.umd.edu ("Matthew T. Russotto")
  2243. Subject: Re:  Assembly language environment for the Mac?
  2244. Message-ID: <9109241714.AA21110@bree.eng.umd.edu>
  2245. Newsgroups: fa.think-c
  2246. Lines: 3
  2247. Date: 24 Sep 91 17:14:58 GMT
  2248.  
  2249. Well, if you already have think C, you can use its inline assmebler feature.
  2250. There is also an old assembler called 'MDS' out there-- it's by Consulair,
  2251. and isn't an integrated environment, but rather separate pieces.
  2252. 
  2253. 
  2254. Path: ucivax!gateway
  2255. From: julian@riacs.edu
  2256. Subject: serial ports
  2257. Message-ID: <26961.685733287@miranda.riacs.edu>
  2258. Newsgroups: fa.think-c
  2259. Lines: 1
  2260. Date: 24 Sep 91 17:28:24 GMT
  2261.  
  2262. Does anyone know what the magic code for 38400 baud is?
  2263. 
  2264. 
  2265. Path: ucivax!gateway
  2266. From: dave@ccs.itd.umich.edu
  2267. Subject: Re: serial ports
  2268. Message-ID: <9109242002.AA17868@ccs.itd.umich.edu>
  2269. In-Reply-To: Your message of "24 Sep 91 17:28:24 GMT."
  2270.              <26961.685733287@miranda.riacs.edu>
  2271. Newsgroups: fa.think-c
  2272. Lines: 10
  2273. Date: 24 Sep 91 20:03:33 GMT
  2274.  
  2275. > From:    julian@riacs.edu
  2276. > To:      think-c@ics.uci.edu
  2277. >
  2278. >Does anyone know what the magic code for 38400 baud is?
  2279.  
  2280. Apple hasn't defined numbers for all possible baud rates.  If they
  2281. don't have a number for the rate you want to use, you need to change it
  2282. by making a PBControl call to the driver with the csCode of 13, and the
  2283. baud rate in the csParam field.  (See IM II-254)
  2284.   --dave koziol
  2285. 
  2286. 
  2287. Path: ucivax!gateway
  2288. From: mxmora@unix.sri.com
  2289. Subject: Re:  Assembly language environment for the Mac?
  2290. Message-ID: <9109242034.AA18015@unix.sri.com>
  2291. Newsgroups: fa.think-c
  2292. Lines: 23
  2293. Date: 24 Sep 91 20:34:48 GMT
  2294.  
  2295.  
  2296. There is a shareware Assembler call MacAssembly I think. Its from Dave
  2297. McWherter. Below is the address from his DA MacSink. I'm not sure that MA
  2298. is still supported. The last version was 7.something. I hear that it was/is
  2299. one of the best assemblers for the mac.
  2300.  
  2301.  
  2302.    Preferred Publishers, Inc.
  2303.    5100 Poplar Ave., Suite 617
  2304.    Memphis, TN 38137
  2305.  
  2306. Or you can place a VISA, MC or AMEX order at (800) 446-6393.
  2307.  
  2308. For information or support, call (901) 683-3383.
  2309. _____________________________________________________________________
  2310. Disclaimer: Everything is relative, it all depends on the point of view
  2311.             of the observer.
  2312. _____________________________________________________________________
  2313.    Matthew Xavier Mora                   |  The keeper of the UMPG
  2314.    SRI International                     |  Matt_Mora@qm.sri.com
  2315.    [sent using Eudora 1.2 ]              |  mxmora@unix.sri.com
  2316. _____________________________________________________________________
  2317.  
  2318. 
  2319. 
  2320. Path: ucivax!gateway
  2321. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  2322. Subject: WDEFs-as-objects
  2323. Message-ID: <9109251049.aa27717@dcs.ed.ac.uk>
  2324. Newsgroups: fa.think-c
  2325. Lines: 22
  2326. Date: 25 Sep 91 18:24:00 GMT
  2327.  
  2328. I'm toying with the idea of implementing a package for custom windows, and
  2329. would quite like to do it in the way that Greg implemented the custom menus
  2330. in the TC demo program, i.e. with a WDEF class hooked into a stub code
  2331. resource. My main question is whether this is provided in TC5.0, either in
  2332. the class library or the demo programs. We don't have TC5.0 in the UK yet,
  2333. and I don't want to do the work only to find it provided when the upgrade
  2334. materialises.
  2335.  
  2336. If there isn't a demo of this form, I'll give it a spin myself. Greg's WDEF
  2337. for tear-offs is a start, although I'll need to implement resizing,
  2338. zoom-boxes and so on.
  2339.  
  2340. Quickie tech. question: am I responsible for putting A5 somewhere safe? It
  2341. seems as if WDEFs are called directly by the Window Manager, so if one
  2342. application uncovers a window of another, the second app's window frame is
  2343. drawn immediately. I suspect the second app's register context isn't in
  2344. place here. (I believe this is the lowest of the three kinds of MultiFinder
  2345. context switch, so things like the resource file chain won't be in place
  2346. either.)
  2347.  
  2348.         Nick.
  2349.  
  2350. 
  2351. 
  2352. Path: ucivax!gateway
  2353. From: olson@endor.harvard.edu
  2354. Subject: Re: WDEFs-as-objects
  2355. Message-ID: <9109252129.AA25407@bootsie.UUCP>
  2356. In-Reply-To: Nick Rothwell's message of Wed 25-Sep-91  6:24pm.
  2357. X-Mailer: Mail User's Shell (6.4 2/14/89)
  2358. Newsgroups: fa.think-c
  2359. Reply-To: olson@endor.harvard.edu
  2360. Lines: 21
  2361. Date: 26 Sep 91 02:46:24 GMT
  2362.  
  2363. In your message of Sep 25,  6:24pm, you write:
  2364. >
  2365. > I'm toying with the idea of implementing a package for custom windows, and
  2366. > would quite like to do it in the way that Greg implemented the custom menus
  2367. > in the TC demo program, i.e. with a WDEF class hooked into a stub code
  2368. > resource.
  2369.  
  2370. I tried this, but it didn't work.  I asked Greg Dow about it, and he
  2371. said something about a weird bug (I don't recall the specifics).
  2372.  
  2373. The bug might have been fixed in THINK C 5, if it was related to THINK C 4,
  2374. so its probably worth trying again :-).
  2375.  
  2376. -Eric
  2377.  
  2378.  
  2379. --
  2380. Eric K. Olson, Editor, Prepare()      NOTE:     olson@bootsie.uucp doesn't work
  2381. Lexington Software Design             Internet: olson@endor.harvard.edu
  2382. 72A Lowell St., Lexington, MA  02173  Uucp:     harvard!endor!olson
  2383. (617) 863-9624                        Bitnet:   OLSON@HARVARD
  2384. 
  2385. 
  2386. Path: ucivax!gateway
  2387. From: poneill@eleazar.dartmouth.edu (Darke Childe)
  2388. Subject: Please remove me from this list.
  2389. Message-ID: <9109260347.AA21575@eleazar.dartmouth.edu>
  2390. X-Mailer: Mail User's Shell (7.1.1 5/02/90)
  2391. Newsgroups: fa.think-c
  2392. Lines: 3
  2393. Date: 26 Sep 91 03:47:45 GMT
  2394.  
  2395. thank you
  2396.  
  2397. --
  2398. 
  2399. 
  2400. Path: ucivax!gateway
  2401. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  2402. Subject: WDEFs-as-objects
  2403. Message-ID: <9109261330.AA11483@chaos.cs.brandeis.edu>
  2404. In-Reply-To: olson@endor.harvard.edu's message of 26 Sep 91 02:46:24 GMT <9109252129.AA25407@bootsie.UUCP>
  2405. Newsgroups: fa.think-c
  2406. Lines: 31
  2407. Date: 26 Sep 91 13:30:38 GMT
  2408.  
  2409. From: olson@endor.harvard.edu
  2410.  
  2411.    In your message of Sep 25,  6:24pm, you write:
  2412.    >
  2413.    > I'm toying with the idea of implementing a package for custom windows, and
  2414.    > would quite like to do it in the way that Greg implemented the custom menus
  2415.    > in the TC demo program, i.e. with a WDEF class hooked into a stub code
  2416.    > resource.
  2417.  
  2418.    I tried this, but it didn't work.  I asked Greg Dow about it, and he
  2419.    said something about a weird bug (I don't recall the specifics).
  2420.  
  2421.    The bug might have been fixed in THINK C 5, if it was related to THINK C 4,
  2422.    so its probably worth trying again :-).
  2423.  
  2424. Unless I'm mistaken, the problem doesn't have to do with the OOP
  2425. environment in THINK C, but with the fact that the Window Manager
  2426. isn't reentrant.  If that's the case, then you should have no more
  2427. difficulty in doing this than implementing a custom WDEF in any other
  2428. program when using the "embedded defproc" method.
  2429.  
  2430. The only restriction you'd have is that you wouldn't be able to
  2431. single-step through the code, and if you got a bus error in that code,
  2432. you'd crash the debugger.  The only way to fix this is to use a
  2433. debugger that doesn't use the Window Manager, like MacsBug or TMON.
  2434.  
  2435.     -phil
  2436. ----
  2437.    Phil Shapiro                           Technical Support Analyst
  2438.    Language Products Group                     Symantec Corporation
  2439.         Internet: phils@chaos.cs.brandeis.edu
  2440. 
  2441. 
  2442. Path: ucivax!gateway
  2443. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  2444. Subject: Re: WDEFs-as-objects
  2445. Message-ID: <9109261155.aa13663@dcs.ed.ac.uk>
  2446. Newsgroups: fa.think-c
  2447. Lines: 13
  2448. Date: 26 Sep 91 16:34:43 GMT
  2449.  
  2450. >I tried this, but it didn't work.  I asked Greg Dow about it, and he
  2451. >said something about a weird bug (I don't recall the specifics).
  2452.  
  2453. As in, a bug in TC4.0.x? Hmm. Apart from some A5 voodoo, I don't see why
  2454. it should be any harder than the MDEF example.
  2455.  
  2456. I suppose I'd better find somewhere to store A5. I was thinking of putting
  2457. in at the end of the two dimensions rectangles stored in dataHandle...
  2458.  
  2459. I'll let y'all know how I get on...
  2460.  
  2461.         Nick.
  2462.  
  2463. 
  2464. 
  2465. Path: ucivax!gateway
  2466. From: dedreb@arco.com
  2467. Subject: GetKeys Source Code
  2468. Message-ID: <9109261639.AA12422@Arco.COM>
  2469. Newsgroups: fa.think-c
  2470. Lines: 16
  2471. Date: 26 Sep 91 16:40:18 GMT
  2472.  
  2473. I'm having trouble using the GetKeys function with THINK C.  Can anyone
  2474. offer any assistance?  I gave it a shot, but I guess I'm still doing
  2475. something wrong.
  2476.  
  2477. My understanding is that in pascal GetKeys returns a packed array of 128
  2478. Booleans (bits?).  If a bit is on then that key is pressed.  In THINK C,
  2479. GetKeys returns 128 bits in the form of an array of 4 longs, KeyMap[4].  My
  2480. trouble is extracting the bit information from the 4 longs.
  2481.  
  2482. Any help would be greatly appreciated.  Thanks.  :-)
  2483.  
  2484.  
  2485. -------------------------------------
  2486. - Richard Beecher (dedreb@arco.com) -
  2487. --------------------------------------
  2488.  
  2489. 
  2490. 
  2491. Path: ucivax!gateway
  2492. From: cfejm@ux1.cts.eiu.edu (John Miller)
  2493. Subject: MIDI routines in TC5--Help! (Please!!)
  2494. Message-ID: <9109270025.AA31771@ux1.cts.eiu.edu>
  2495. X-Mailer: ELM [version 2.3 PL11]
  2496. Newsgroups: fa.think-c
  2497. Lines: 5
  2498. Date: 27 Sep 91 00:25:42 GMT
  2499.  
  2500.  
  2501. Has anyone tried to use MidiPascal 3.0 with Think C 5.0 (TCL 1.1) and
  2502. gotten it to work?  After many hours of converting my project to TCL 1.1,
  2503. I finally got to the point where I could test some of my MIDI code only
  2504. to find that nothing worked anymore.  Suggestions, anyone?
  2505. 
  2506. 
  2507. Path: ucivax!gateway
  2508. From: idowell@bbn.com
  2509. Subject: Stupid Novice Programmer Question
  2510. Message-ID: <9109270624.aa11048@ics.uci.edu>
  2511. Newsgroups: fa.think-c
  2512. Lines: 12
  2513. Date: 27 Sep 91 13:25:00 GMT
  2514.  
  2515. I'd like to open up a CDataFile when starting up my program
  2516. to read in some initial data.  I'd like to be able to specify
  2517. a path name but if it has to be in the System Folder (or better,
  2518. the Preferences Folder) that's fine.
  2519.  
  2520. I'm having trouble constructing the arguments to pass to the
  2521. SpecifyHFS method.  Would someone be kind enough to send me
  2522. some simple example code?
  2523.  
  2524. aTdHvAaNnKcSe,
  2525. Ian Dowell
  2526. idowell@bbn.com
  2527. 
  2528. 
  2529. Path: ucivax!gateway
  2530. From: paulr@planet8. (Paul Raulerson)
  2531. Subject: Think-C and Oracle
  2532. Message-ID: <9109271339.AA00120@planet8.sp.unisys.com>
  2533. Newsgroups: fa.think-c
  2534. Lines: 20
  2535. Date: 27 Sep 91 13:42:52 GMT
  2536.  
  2537. Arrrrgh!! Has anyone else here tried to use Think-C with Oracle? It is not exactly
  2538. an easy task, and this time, the fault is certainly not Symantec's!
  2539.  
  2540. First, though it will compile quite reasonably under Think-C 5.0, under System-7,
  2541. any attempt at execution results in an un-implemented instruction trap. (Anyone
  2542. proficient at using MacsBug? Please drop me a line on how to pinpoint the beast! :)
  2543.  
  2544. Under System-6.07, after removing a ton of the MPW Include files, it compiles and
  2545. runs with an unimplemented instruction trap, but cannot connect with the Oracle
  2546. database... even though Hypercard has nooooooo problem doing so! Drat Drat Drat!
  2547.  
  2548. Oracle isn't much of any help, since I bought the database 2nd hand and they want
  2549. me to sign over my first born son saying it isn't illegal. (Sorta willing... that
  2550. Database ENgine is *nice*. :)
  2551.  
  2552. In any case, if anyone out there has tangled with this Oracle beast, and has Think-C
  2553. working well with it, *please* point out what manner of dragon you had to slay to
  2554. get there. ;)  Oh yeah- Oracle version is 1.2 (database version) for Macintosh.
  2555. Thanks!
  2556. -Paul
  2557. 
  2558. 
  2559. Path: ucivax!gateway
  2560. From: Mark.Alldritt@vancouver.osiware.bc.ca (Mark Alldritt)
  2561. Subject: THINK Reference
  2562. Message-ID: <9109271418*Mark.Alldritt@Vancouver.osiware.bc.ca>
  2563. Newsgroups: fa.think-c
  2564. Lines: 5
  2565. Date: 27 Sep 91 16:43:24 GMT
  2566.  
  2567. Does anyone know if or when the THINK Reference will be upgraded to include
  2568. information from Inside Mac VI?
  2569.  
  2570. Thanks
  2571. -Mark
  2572. 
  2573. 
  2574. Path: ucivax!gateway
  2575. From: perm@meryl.csd.uu.se (Per Mildner)
  2576. Subject: SetPenState declaration bug?
  2577. Message-ID: <9109271823.AA06338@meryl.csd.uu.se>
  2578. Newsgroups: fa.think-c
  2579. Lines: 6
  2580. Date: 27 Sep 91 18:27:01 GMT
  2581.  
  2582. It's declared (Think C 5.0 Quickdraw.h)
  2583. pascal void SetPenState(const PenState *pnState) = ...
  2584. shouldn't that be
  2585. pascal void SetPenState(const PenState pnState) = ...
  2586.  
  2587. Per Mildner (perm@CSD.UU.SE)
  2588. 
  2589. 
  2590. Path: ucivax!gateway
  2591. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  2592. Subject: Re: WDEFs-as-objects
  2593. Message-ID: <9109271155.aa00413@dcs.ed.ac.uk>
  2594. Newsgroups: fa.think-c
  2595. Lines: 13
  2596. Date: 27 Sep 91 18:27:11 GMT
  2597.  
  2598. >The only restriction you'd have is that you wouldn't be able to
  2599. >single-step through the code, and if you got a bus error in that code,
  2600. >you'd crash the debugger.  The only way to fix this is to use a
  2601. >debugger that doesn't use the Window Manager, like MacsBug or TMON.
  2602.  
  2603. Or even (shriek!) not use a debugger at all...! Actually, I have some
  2604. secure diagnostic routines which I implemented for debugging at the MIDI
  2605. interrupt level, so I should be able to manage if I take care... The A5
  2606. saving I'll have to think about. Thanks for the debugger warning - I hadn't
  2607. thought of that but it's obvious now that there could easily be a problem.
  2608.  
  2609.         Nick.
  2610.  
  2611. 
  2612. 
  2613. Path: ucivax!gateway
  2614. From: dave@ccs.itd.umich.edu
  2615. Subject: MDEFs
  2616. Message-ID: <9109280618.AA27950@ccs.itd.umich.edu>
  2617. Newsgroups: fa.think-c
  2618. Lines: 6
  2619. Date: 28 Sep 91 06:20:04 GMT
  2620.  
  2621. Does anyone know where the mDrawItemMsg, and mCalcItemMsg messages to
  2622. MDEFs are documented?  I can't seem to find anything, but I don't have
  2623. every tech note...
  2624. Thanks,
  2625.   --dave koziol
  2626.     u of michigan
  2627. 
  2628. 
  2629. Path: ucivax!gateway
  2630. From: s57783@zeus.usq.edu.au (chapman alan)
  2631. Subject: GetResInfo Results??
  2632. Message-ID: <9109291013.AA03662@zeus.usq.edu.au>
  2633. Newsgroups: fa.think-c
  2634. Lines: 1
  2635. Date: 29 Sep 91 00:17:38 GMT
  2636.  
  2637. The following code is extracted from an application I am writing.My question is simple.  Why does theType, as returned by GetResInfo,not work as an argument for CountResources or GetResource?  I have checked with the Think C Debugger (4.0.5) and the result of theGetResInfo call seems good, and each call to ResError returns zero.If I call CountResources with 'gMNU' rather than the result fromGetResInfo, it works fine but it defeats my purpose [the call to GetResource is not normally in this bit of code].Thanks for any help you can give,Alan Chapman.s57783@zeus.usq.edu.aumain(){Handle    theHandle;int        theID, resErr, count;char    theType[4];Str255    name;theHandle = GetResource('gMNU', 20791);GetResInfo(theHandle, &theID, &theType, name);resErr = ResError();ReleaseResource(theHandle);resErr = ResError();count = CountResources(theType);resErr = ResError();theHandle = GetResource(theType, theID);resErr = ResError();}
  2638. 
  2639. 
  2640. Path: ucivax!gateway
  2641. From: s57783@zeus.usq.edu.au (chapman alan)
  2642. Subject: GetResInfo Results Solved
  2643. Message-ID: <9109291050.AA03781@zeus.usq.edu.au>
  2644. Newsgroups: fa.think-c
  2645. Lines: 9
  2646. Date: 29 Sep 91 00:54:07 GMT
  2647.  
  2648. OK I goofed, sorry for the wasted time.
  2649.  
  2650. I needed to declare theType as being of type ResType (which I had previously
  2651. done but had failed to pass it as &theType to GetResInfo).  I thought I had
  2652. done the right thing based on what the debugger gave back but too bad now, it's
  2653. fixed.
  2654.  
  2655. Thanks,
  2656. Alan.
  2657. 
  2658. 
  2659. Path: ucivax!gateway
  2660. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  2661. Subject: WDEF's-as-objects: I'm *this* close, but...
  2662. Message-ID: <9109301122.aa25551@dcs.ed.ac.uk>
  2663. Newsgroups: fa.think-c
  2664. Lines: 28
  2665. Date: 30 Sep 91 12:27:15 GMT
  2666.  
  2667. Well, I've pretty well got the WDEF thing working now - WDEF code resource
  2668. stub pointing into a generic dispatch routine and directing WDEF messages
  2669. to methods of a generic CWDEF Class. It all works fine, with one exception:
  2670. when the test application is in the background and is called upon to draw a
  2671. window frame, the frame is drawn through all the frontmost windows. It
  2672. behaves perfectly when the test application is the front layer.
  2673.  
  2674. The problem seems to be A5-World related. That would explain why it all
  2675. works fine in the foreground. I have to switch to the application's A5 to
  2676. get into the object and call methods and get at globals, of course. I tried
  2677. restoring the front app's A5 during the frame drawing, and that fixes the
  2678. problem (although it screws up any global and procedure access in the
  2679. object, of course, which is unacceptable). So, my guess is the following:
  2680. when a background app's WDEF is called to draw the frame, the front app's
  2681. A5 world contains the clipping information (possibly the visRgn of the WM
  2682. port). Swapping A5's loses the clipping information, so the frame draws
  2683. through the front windows.
  2684.  
  2685. Anybody have any suggestions? I can probably get it working with a little
  2686. more effort, but I'd quite like to know *why*, rather than risk having a
  2687. solution which breaks under System 7.0.0001.
  2688.  
  2689. In return, you get your name in the credits when I post the code. It's all
  2690. packaged up as a project, and requires minimal glue (one procedure call in
  2691. the actual application).
  2692.  
  2693.         Nick.
  2694.  
  2695. 
  2696. 
  2697. Path: ucivax!gateway
  2698. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  2699. Subject: GetKeys Source Code
  2700. Message-ID: <9109301513.AA17238@chaos.cs.brandeis.edu>
  2701. In-Reply-To: dedreb@arco.com's message of 26 Sep 91 16:40:18 GMT <9109261639.AA12422@Arco.COM>
  2702. Newsgroups: fa.think-c
  2703. Lines: 81
  2704. Date: 30 Sep 91 15:13:07 GMT
  2705.  
  2706. Here's a very ugly example of deciphering the KeyMap bits in THINK C.
  2707. It isn't anything special, but I thought that it may be a bit of help.
  2708.  
  2709. Enjoy,
  2710.  
  2711.     -phil
  2712. ----
  2713.    Phil Shapiro                           Technical Support Analyst
  2714.    Language Products Group                     Symantec Corporation
  2715.         Internet: phils@chaos.cs.brandeis.edu
  2716.  
  2717. ---------------- GetKeys.c ----------------
  2718. /*
  2719.  * GetKeys.c -- code frag that shows how to use the 'Old-style' KeyMap
  2720.  * structure, i.e., one that consists of an array of four longints.  This code
  2721.  * is appropriate for C 4.0 and Pascal 2.0.
  2722.  * Copyright ) 1990 Phil Shapiro, Symantec Corp.
  2723.  */
  2724.  
  2725. #include <stdio.h>
  2726. #include <console.h>
  2727. #include <string.h>
  2728.  
  2729. #include <EventMgr.h>
  2730.  
  2731.  
  2732. #define ENTRIES    128
  2733.  
  2734. /* hardcoded entries for the standard Mac II adb keyboard */
  2735.  
  2736. char *nameMap[ENTRIES] =
  2737.         { "A", "S", "D", "F", "H", "G", "Z", "X", "C", "V", 0,
  2738.           "B", "Q", "W", "E", "R", "Y", "T", "1", "2", "3", "4",
  2739.           "6", "5", "=", "9", "7", "-", "8", "0", "]", "O", "U",
  2740.           "[", "I", "P", "Return Key", "L", "J", "'", "K", ";", "\\",
  2741.           ",", "/", "N", "M", ".", "Tab Key", "Space Bar", "`",
  2742.           "Backspace Key", "Enter Key", "Escape Key", 0, "Command Key",
  2743.           "Shift Key", "Caps Lock Key", "Option Key", "Control Key", 0,
  2744.           0, 0, 0, 0, ". on Keypad", 0, "* on Keypad", 0, "+ on Keypad",
  2745.           0, "Clear Key", 0, 0, 0, "/ on Keypad", "Enter on Keypad",
  2746.           0, "- on Keypad", 0, 0, "= on Keypad", "0 on Keypad",
  2747.           "1 on Keypad", "2 on Keypad", "3 on Keypad", "4 on Keypad",
  2748.           "5 on Keypad", "6 on Keypad", "7 on Keypad", 0, "8 on Keypad",
  2749.           "9 on Keypad", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2750.           0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Left Arrow",
  2751.           "Right Arrow", "Down Arrow", "Up Arrow", "keycode 0xff"};
  2752.     /* 128 entries */
  2753.  
  2754.  
  2755. void checkfor(KeyMap, short, char *);
  2756.  
  2757. void
  2758. checkfor(KeyMap map,short num, char *name)
  2759. {
  2760.     if (map.Key[num / 32] & ((1L << (num % 8)) << (24 - (8 * ((num % 32) / 8)))))
  2761.         if (name)
  2762.             printf("You pressed the %s.\n",name);
  2763.         else
  2764.             printf("You pressed keycode %#x.\n",num);
  2765. }
  2766.  
  2767. main()
  2768. {
  2769.     KeyMap    myMap;
  2770.     short i;
  2771.  
  2772.     printf("\n");
  2773.     do {
  2774.         GetKeys(&myMap);
  2775.         if (myMap.Key[0] || myMap.Key[1] || myMap.Key[2] || myMap.Key[3]) {
  2776. #ifdef DEBUG
  2777. /* print out the bits for each key */
  2778.             printf("%08lX\t%08lX\t%08lX\t%08lX\n", myMap.Key[0], myMap.Key[1],
  2779.                     myMap.Key[2], myMap.Key[3]);
  2780. #endif
  2781.             for (i = 0; i < ENTRIES; ++i)
  2782.                 checkfor(myMap, i, nameMap[i]);
  2783.         }
  2784.     } while (!Button());
  2785.     FlushEvents(everyEvent,0);    /* trash the keyevents */
  2786. }
  2787. 
  2788. 
  2789. Path: ucivax!gateway
  2790. From: bdugan@gnu.ai.mit.edu
  2791. Subject: Hello
  2792. Message-ID: <9109302141.AA45199@hal.gnu.ai.mit.edu>
  2793. Newsgroups: fa.think-c
  2794. Lines: 1
  2795. Date: 30 Sep 91 21:45:54 GMT
  2796.  
  2797. Please add me to the THINK C mailing list.
  2798. 
  2799. 
  2800. Path: ucivax!gateway
  2801. From: HHARMAN%midd.cc.middlebury.edu@mitvma.mit.edu
  2802. Subject: The Think C electronic mailing list
  2803. Message-ID: <01GB7CW7MA3K00188N@MIDD.CC.MIDDLEBURY.EDU>
  2804. Newsgroups: fa.think-c
  2805. X-VMS-To: IN%"think-c@ics.uci.edu"
  2806. Lines: 5
  2807. Date: 30 Sep 91 23:22:14 GMT
  2808. X-Envelope-to: think-c@ics.uci.edu
  2809.  
  2810. Hello,
  2811. I am a owner of the THINK C compiler and would like to be on this list.
  2812. I am assuming this is the right place to ask. Thanks.
  2813.  
  2814. Hayden
  2815. 
  2816.